-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interpolation of 3D Arrays does not work since v0.9.0 #260
Comments
I'm beginning to think we may need to create a custom |
I think it's a good idea. The current behaviour is confusing and annoying. Creating a show() method does a lot to reduce that confusion, and has no real disadvantages as far as I can tell. |
Add show method that circumvents bounds errors (fixes #260)
The test in However, I still run into the same problem in the REPL.
|
Lines 115 to 117 in 56a4569
are not reached when calling
and similar for the other two would fix the problem. Here is my local output:
Needless to say that I have no clue when the 3-args |
Since the release of v0.9.0, which introduced Bounds Errors, the interpolation of 3d grids does not work anymore. The following code is a minimum example extended from the 2d example code. It runs just fine in v0.8.0 but not in later releases:
A = rand(8,8,20)
knots = ([x^2 for x = 1:8], [x^2 for x = 1:8], [0.2y for y = 1:20])
itp = interpolate(knots, A, Gridded(Linear()))
itp(4,4,1.2)
A[2,2,6]
At line 3 where I initialize the interpolations object I get the following error message
Error showing value of type Interpolations.GriddedInterpolation{Float64,3,Float64,Gridded{Linear},Tuple{Array{Int64,1},Array{Int64,1},Array{Float64,1}}}: ERROR: BoundsError: attempt to access 8×8×20 interpolate((::Array{Int64,1},::Array{Int64,1},::Array{Float64,1}), ::Array{Float64,3}, Gridded(Linear())) with element type Float64 at index [Base.OneTo(8), Base.OneTo(8), 18]
The text was updated successfully, but these errors were encountered: