Skip to content

Commit

Permalink
Fixing doc
Browse files Browse the repository at this point in the history
  • Loading branch information
gviejo committed Feb 6, 2025
1 parent 9dc3e30 commit 0df3119
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions doc/user_guide/02_input_output.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,15 @@ When the pynapple object have metadata, they are added to the NPZ file.
tsgroup = nap.TsGroup({
0:nap.Ts(t=[0,1,2]),
1:nap.Ts(t=[0,1,2])
}, my_label = ["a", "b"])
}, metadata={"my_label":["a", "b"]})
tsgroup.save("group")
print(np.load("group.npz"))
print(np.load("group.npz")["my_label"])
print(np.load("group.npz", allow_pickle=True))
```
By default, they are added within the `_metadata` key:

```{code-cell} ipython3
print(dict(np.load("group.npz", allow_pickle=True))["_metadata"])
```

## Memory map
Expand Down

0 comments on commit 0df3119

Please sign in to comment.