You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently tried to use Rasters.jl rasters (basically AbstractArrays) with DataInterpolations, only for it to fail.
This turned out to be because it essentially called typeof(input_array)(multiplied_array), which wasn't defined for Rasters in such exactness (Raster(::Raster) was defined, but not with all the type parameters written out).
I defined it and it worked perfectly, but I wanted to understand why this method is called in the first place.
Wouldn't multiplication give you the correct type anyway, or is this for e.g. Float64-Float32 conversion concerns?
If so, since AbstractArrays are typed as AbstractArray{N, T}, would it be possible to just run T.(multiplied_array)?
The text was updated successfully, but these errors were encountered:
This could probably be improved to use a smaller subset of the interfaces, yes. That likely comes down to Rasters missing an ArrayInterface overload and having to use a fallback.
I recently tried to use Rasters.jl rasters (basically
AbstractArray
s) with DataInterpolations, only for it to fail.This turned out to be because it essentially called
typeof(input_array)(multiplied_array)
, which wasn't defined for Rasters in such exactness (Raster(::Raster)
was defined, but not with all the type parameters written out).I defined it and it worked perfectly, but I wanted to understand why this method is called in the first place.
Wouldn't multiplication give you the correct type anyway, or is this for e.g. Float64-Float32 conversion concerns?
If so, since AbstractArrays are typed as
AbstractArray{N, T}
, would it be possible to just runT.(multiplied_array)
?The text was updated successfully, but these errors were encountered: