one of the input_buffer_* PythonBufferErrorCode on failure and success otherwise.
import mir.ndslice.slice: Slice; auto bar(ref const Py_buffer view) { Slice!(const(double)*, 2) mat; if (auto error = mat.fromPythonBuffer(view)) { // has null pointer } return mat; }
Fills the slice (structure) from the python view. The view should be created by $(PGB) that was called with pythonBufferFlags.