-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
interpret max_cardinality
and min_cardinality
as axis size constraints?
#5
Comments
That makes sense and looks good to me. I also think your suggested change to the metamodel would be nice. @cmungall what do you think? |
Few things to unpack here…
Shouldn’t the constraints be on the NDArray rather than DataArray axes?
It seems we want to align as closely as possible to nptyping
https://github.com/ramonhagenaars/nptyping/blob/master/USERDOCS.md#Examples
More later…
…On Sat, Feb 3, 2024 at 12:51 AM Ryan Ly ***@***.***> wrote:
I used min_cardinality and max_cardinality
That makes sense and looks good to me.
I also think your suggested change to the metamodel would be nice.
@cmungall <https://github.com/cmungall> what do you think?
—
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAMMOIBDH75OKHCV465J7DYRX273AVCNFSM6AAAAABCXUNUVOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVGIZDCNJVGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yes maybe i need to clear up how y'all are thinking about the DataArray axes, but wherever we would put them, in this case just suggesting these be the terms used (i figure y'all had probably already thought about this, just wanted to start the ball rolling on getting it in the model somehow) |
Something that would be nice to have is the ability to constrain the size of an array. I think the example of a "video" type is a good motivating case - if we are accepting an RGB Video, we want to be able to express "x and y axes of any size, but channels == 3"
I used
min_cardinality
andmax_cardinality
in nwb-linkml for this, such that for an RGBImage one expresses the array component as (with minor adjustments to match linkml-array syntax):creates a pydantic model like this (i also collapse the array class into the parent class that has other attributes there, but you get the idea)
what do y'all think about having that be the means of specifying array sizes? It seems to match the semantics of that slot as its used elsewhere, and so we basically get it for free right?
If there was one suggestion i'd make to a change to the metamodel, it's sort of awkward to have to specify both the max and min to say that cardinality should
==
a value, so it might be nice to change that to work like:but that's just a "nice to have" not a critical thing
The text was updated successfully, but these errors were encountered: