shape error for OpticalSeries.data #16
Unanswered
bendichter
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
(copy/pasted from email conversation with Ueli Rutishauser (@urut). Moved here for posterity)
Ueli,
Yes, this is a sort of obscure way that we annotate shape constraints. If you create a dataset like this:
that will create a 3-dimensional array that should pass this check.
Explanation, if you are curious:
See our shape constraint documentation here. This particular shape constraint specification is ([None, None, None], [None, None, None, 3]).This is a list of two allowable specifications, [None, None, None] or [None, None, None, 3]. The length of each specification specifies the dimensionality of the array. A number is a fixed dimension length, and None means any length. The first allowable shape is any 3-dimensional array, and is intended for a sequence of grayscale images of shape [time * x * y]. The second specification is for a 4-D array with the last dimension as 3, which would be a sequence of color images of shape (t * x * y * (r,g,b)).
Now that I see this, I see that this would be pretty impossible for someone to decipher, so we definitely need to fix that.
Beta Was this translation helpful? Give feedback.
All reactions