G-Node / G-Node/nixpy

Writing of data via index+slices silently ignores data exceeding the DataArray's shape

Open
#137 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
22
Forks
29
PR merge metrics
No merged PRs in 30d

Description

Look here:

``` python
import nix
fd = nix.File.open('test.h5', nix.FileMode.Overwrite)
b = fd.create_block('b', 'notype')
d = b.create_data_array('da', 'stillnotype')
d = b.create_data_array('da', 'stillnotype', nix.DataType.Double, (0,0))
d[:, :] = np.ones((23, 42))
d[...]
# Out: array([], shape=(0, 0), dtype=float64)
d2 = b.create_data_array('da', 'stillnotype', nix.DataType.Double, (12,13))
d2 = b.create_data_array('da2', 'stillnotype', nix.DataType.Double, (12,13))
d2[:, :] = np.ones((23, 42))
d2[...]
d2.shape
# Out: (12, 13)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.