Consider the following construction:
scale(interpolate(ones(2,2), BSpline(Linear())), 1:2, 1:2)
The printed description of this object is given as
scale(interpolate(::Matrix{Float64}, BSpline(Linear())), (1:2, 1:2))
Note the xs (1:2,1:2) are printed as a tuple.
However, the following construction fails:
scale(interpolate(ones(2,2), BSpline(Linear())), (1:2, 1:2)) #ERROR: MethodError: no method matching scale(...
I propose that we define this method so that one can write
scale(interpolate(ones(2,2), BSpline(Linear())), (1:2, 1:2))
and get
scale(interpolate(ones(2,2), BSpline(Linear())), 1:2, 1:2).
In fact, it took me quite a while to realize that the second construction was required, and figure out why my construction wasn't working.
Consider the following construction:
scale(interpolate(ones(2,2), BSpline(Linear())), 1:2, 1:2)
The printed description of this object is given asscale(interpolate(::Matrix{Float64}, BSpline(Linear())), (1:2, 1:2))
Note the xs(1:2,1:2)
are printed as a tuple.However, the following construction fails:
scale(interpolate(ones(2,2), BSpline(Linear())), (1:2, 1:2)) #ERROR: MethodError: no method matching scale(...
I propose that we define this method so that one can write
scale(interpolate(ones(2,2), BSpline(Linear())), (1:2, 1:2))
and getscale(interpolate(ones(2,2), BSpline(Linear())), 1:2, 1:2)
.In fact, it took me quite a while to realize that the second construction was required, and figure out why my construction wasn't working.