discretize icon indicating copy to clipboard operation
discretize copied to clipboard

Improve checks for `vType` together with `view`

Open prisae opened this issue 7 years ago • 1 comments

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.

prisae avatar Nov 08 '18 17:11 prisae

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.

prisae avatar Nov 08 '18 17:11 prisae