-
Notifications
You must be signed in to change notification settings - Fork 6
implement arbitrary metadata for LArray objects #78
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
Comments
+ handle metadata in I/O functions relying on HDF format
+ handle metadata in I/O functions relying on HDF format
+ handle metadata in I/O functions relying on HDF format
+ handle metadata in I/O functions relying on HDF format
+ handle metadata in I/O functions relying on HDF format
+ handle metadata in I/O functions relying on HDF format
+ handle metadata in I/O functions relying on HDF format
+ handle metadata in I/O functions relying on HDF format
+ handle metadata in I/O functions relying on HDF format
+ handle metadata in I/O functions relying on HDF format
+ handle metadata in I/O functions relying on HDF format
Let us sum up a little bit:
# add new metadata
>>> arr.attrs.creation_date = datetime(2017, 2, 10)
# access metadata
>>> arr.attrs.creation_date
datetime.datetime(2017, 2, 10, 0, 0)
# modify metadata
>>> arr.attrs.creation_date = datetime(2017, 2, 16)
# delete metadata
>>> del arr.attrs.creation_date |
I mostly have still the same opinion.
|
Specifications for metadata:
# add new metadata
>>> arr.attrs.creation_date = datetime(2017, 2, 10)
# access metadata
>>> arr.attrs.creation_date
datetime.datetime(2017, 2, 10, 0, 0)
# modify metadata
>>> arr.attrs.creation_date = datetime(2017, 2, 16)
# delete metadata
>>> del arr.attrs.creation_date
>>> arr = LArray(data, axes, attrs=OrderedDict([('title', 'my title')]))
c) When NOT to copy them:
@gdementen feel free to edit this comment. I will use it as specifications for implementing metadata. |
>>> arr = LArray(data, axes, Attrs(title='my title')) and I think it would be useful to implement this in addition to the dict syntax, in the same vein that we support an AxisCollection object or a string or xyz... We do not necessarily need to advertise this though. |
How would like to make the poll? Via the Google group |
Result of the poll is |
For the record: after some discussion, we decided to NOT propagate metadata. Propagating metadata through the code may lead to final arrays with irrelevant metadata. |
Please keep a backup of your branch somewhere so that if we change our minds later (or are pressured to do so) you do not need to redo everything... |
- fix larray-project#79 : included metadata when saving/loading an array to/from an HDF file.
all array creation functions should be updated + I/O functions
we probably want to generalize to any metadata (store title and description in a .meta dictionary) or something like that.
The text was updated successfully, but these errors were encountered: