discretize
discretize copied to clipboard
Improve checks for `vType` together with `view`
As far as I could figure out, with the help of @thast (thanks!), the vType-options N, E, and F are for view='vec' only. However, this is not checked in plotSlice (and probably other locations, _plotImage2D comes to my mind).
So calling, e.g., mesh.plotSlice(data, vType='E') without specifying view='vec' will result in a shape error, most likely.
For the experienced discretize-user this might be logic, but not for the rest. So we should add a test, ensuring view='vec' if vType is any of N, E, F.
This could be combined with giving a bit more explanation about vType in the docstrings. At the moment the docstrings of plotSlice and friends are very austere.