Skip to content

Commit bfc67b9

Browse files
authored
Merge pull request #414 from pynapple-org/dev
Fixing doc
2 parents 4f12422 + b85c3d4 commit bfc67b9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

doc/user_guide/02_input_output.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,15 @@ When the pynapple object have metadata, they are added to the NPZ file.
156156
tsgroup = nap.TsGroup({
157157
0:nap.Ts(t=[0,1,2]),
158158
1:nap.Ts(t=[0,1,2])
159-
}, my_label = ["a", "b"])
159+
}, metadata={"my_label":["a", "b"]})
160160
tsgroup.save("group")
161161
162-
print(np.load("group.npz"))
163-
print(np.load("group.npz")["my_label"])
162+
print(np.load("group.npz", allow_pickle=True))
163+
```
164+
By default, they are added within the `_metadata` key:
165+
166+
```{code-cell} ipython3
167+
print(dict(np.load("group.npz", allow_pickle=True))["_metadata"])
164168
```
165169

166170
## Memory map

0 commit comments

Comments
 (0)