It is an array, so a.size should be sufficient. Anyway, I think this is good, but will wait a bit in case someone else has a comment. Also seems right to me that an array shaped i.e. (0, 4, 4) returns a (0, 4, 4) array, now that these are vectorized, which might be worthy to test, too, as it is a bit of a different thing.