-
Notifications
You must be signed in to change notification settings - Fork 15
Description
interpolate requires that z is an AbstractMatrix, ie rank 2, but contours and contour etc are happy to take any kind of data, as long as the first two dimensions match x and y.
I passed a rank 3 array (of eigenenergies over 2d momentum space), hoping to get contours over all the energies, but the error only appears in the interpolate function. Since z should be a matrix there, the higher-level functions should also only accept a matrix.
Weirdly, the MethodError isn't thrown if I pass a list of levels directly, or if those levels don't intersect with the data, because get_levels_cells returns an empty Dict, so the iteration in trace_contour doesn't happen and so the preallocated ContourLevel is returned without anything actually put in it:
Line 291 in 26994c4
| contours = ContourLevel(h, Curve2{VT}[]) |
which relates to #80