porespy icon indicating copy to clipboard operation
porespy copied to clipboard

Would be helpful if `shape=[100, 100, 0]` was treated the same as `shape=[100, 100]`

Open jgostick opened this issue 1 year ago • 2 comments

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.

jgostick avatar Jun 21 '23 10:06 jgostick

Also, None would be an option. So [100, None, 100] would be shrunk to [100, 100].

jgostick avatar Jun 24 '24 15:06 jgostick

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.

jgostick avatar Jul 08 '24 23:07 jgostick