porespy
porespy copied to clipboard
Would be helpful if `shape=[100, 100, 0]` was treated the same as `shape=[100, 100]`
This is a minor enhancement, but would make 2D images compatible with openpnm, since a 0 in the 3rd dimension is requried by openpnm to make a 2D network.
Also, None
would be an option. So [100, None, 100]
would be shrunk to [100, 100]
.
The best way to do this would be to create a helper method in the utils
module called _parse_shape
which contains all the logic. Each generator function would then call this function as one of its first steps.