ARCHIVED TRAINING / h5py/h5py
h5py__h5py-2577
This is a preserved training example. Membership in the current training wave has not been verified.
Problem statement
dataset.read_direct fails with ZeroDivisionError when '0 in shape'
Potential regression of #281, or simply related. H5py allows storing of empty arrays where any one of the dimensions can be 0 (e.g., `(0,)`, `(1, 0)`, `(1, 0, 3)`). If this dataset is read using `read_direct`, a `ZeroDivisionError` is thrown.
<details>
<summary>System version details (click to expand)</summary>
* Operating System (e.g. Windows 10, MacOS 10.11, Ubuntu 16.04.2 LTS, CentOS 7)
Arch Linux
* Python version (e.g. 2.7, 3.5)
3.6.0
* Where Python was acquired (e.g. system Python on MacOS or Linux, Anaconda on
Windows)
System repositories
* h5py version (e.g. 2.6)
2.7.0
* HDF5 version (e.g. 1.8.17)
1.10
</details>
Minimal script:
```python
import h5py
import numpy as np
print(h5py.version.info)
shape = (0,) # also try (1, 0, 2) or anything with 0 in it
hfile = h5py.File("/tmp/zerodata.h5", "w")
ds = hfile.create_dataset("ds", data=np.zeros(shape))
print("---------------------------------")
print(ds)
print(hfile["ds"])
print(hfile["ds"][:])
dsread = np.zeros(shape)
hfile["ds"].read_direct(dsread) # division by zero
hfile.close()
```
Output
```
Summary of the h5py configuration
---------------------------------
h5py 2.7.0
HDF5 1.10.0
Python 3.6.0 (default, Jan 16 2017, 12:12:55)
[GCC 6.3.1 20170109]
sys.platform linux
sys.maxsize 9223372036854775807
numpy 1.12.1
---------------------------------
<HDF5 dataset "ds": shape (0,), type "<f8">
<HDF5 dataset "ds": shape (0,), type "<f8">
[]
Traceback (most recent call last):
File "zero.py", line 17, in <module>
hfile["ds"].read_direct(dsread) # division by zero
File "/usr/lib/python3.6/site-packages/h5py/_hl/dataset.py", line 654, in read_direct
for mspace in dest_sel.broadcast(source_sel.mshape):
File "/usr/lib/python3.6/site-packages/h5py/_hl/selections.py", line 303, in broadcast
chunks = tuple(x//y for x, y in zip(count, tshape))
File "/usr/lib/python3.6/site-packages/h5py/_hl/selections.py", line 303, in <genexpr>
chunks = tuple(x//y for x, y in zip(count, tshape))
ZeroDivisionError: integer division or modulo by zero
```
Training membership
opd_e4b_cispo_v5 opd_e4b_pure_v6a opd_e4b_pure_v6b opd_e4b_pure_v7 opd_e4b_pure_v7b opd_e4b_self_audit_v4
Task issues extracted from preserved verified_rft_messages training examples. This is not a verified current RL wave manifest.
Task and snapshot provenance
Snapshot captured 2026-11-12T17:06:59.476467+00:00 · Autoresearch-Arena/gemma-4-developer-agent
{
"datasets": [
"opd_e4b_cispo_v5",
"opd_e4b_pure_v6a",
"opd_e4b_pure_v6b",
"opd_e4b_pure_v7",
"opd_e4b_pure_v7b",
"opd_e4b_self_audit_v4"
],
"examples": 22,
"instance_id": "h5py__h5py-2577",
"problem_statement": "dataset.read_direct fails with ZeroDivisionError when '0 in shape'\nPotential regression of #281, or simply related. H5py allows storing of empty arrays where any one of the dimensions can be 0 (e.g., `(0,)`, `(1, 0)`, `(1, 0, 3)`). If this dataset is read using `read_direct`, a `ZeroDivisionError` is thrown.\r\n\r\n<details>\r\n <summary>System version details (click to expand)</summary>\r\n * Operating System (e.g. Windows 10, MacOS 10.11, Ubuntu 16.04.2 LTS, CentOS 7)\r\nArch Linux\r\n\r\n * Python version (e.g. 2.7, 3.5)\r\n3.6.0\r\n\r\n * Where Python was acquired (e.g. system Python on MacOS or Linux, Anaconda on\r\n Windows)\r\nSystem repositories\r\n\r\n * h5py version (e.g. 2.6)\r\n2.7.0\r\n\r\n * HDF5 version (e.g. 1.8.17)\r\n1.10\r\n</details>\r\n\r\nMinimal script:\r\n```python\r\nimport h5py\r\nimport numpy as np\r\n\r\n\r\nprint(h5py.version.info)\r\n\r\nshape = (0,) # also try (1, 0, 2) or anything with 0 in it\r\nhfile = h5py.File(\"/tmp/zerodata.h5\", \"w\")\r\nds = hfile.create_dataset(\"ds\", data=np.zeros(shape))\r\n\r\nprint(\"---------------------------------\")\r\nprint(ds)\r\nprint(hfile[\"ds\"])\r\nprint(hfile[\"ds\"][:])\r\n\r\ndsread = np.zeros(shape)\r\nhfile[\"ds\"].read_direct(dsread) # division by zero\r\nhfile.close()\r\n```\r\n\r\nOutput\r\n```\r\nSummary of the h5py configuration\r\n---------------------------------\r\n\r\nh5py 2.7.0\r\nHDF5 1.10.0\r\nPython 3.6.0 (default, Jan 16 2017, 12:12:55)\r\n[GCC 6.3.1 20170109]\r\nsys.platform linux\r\nsys.maxsize 9223372036854775807\r\nnumpy 1.12.1\r\n\r\n---------------------------------\r\n<HDF5 dataset \"ds\": shape (0,), type \"<f8\">\r\n<HDF5 dataset \"ds\": shape (0,), type \"<f8\">\r\n[]\r\nTraceback (most recent call last):\r\n File \"zero.py\", line 17, in <module>\r\n hfile[\"ds\"].read_direct(dsread) # division by zero\r\n File \"/usr/lib/python3.6/site-packages/h5py/_hl/dataset.py\", line 654, in read_direct\r\n for mspace in dest_sel.broadcast(source_sel.mshape):\r\n File \"/usr/lib/python3.6/site-packages/h5py/_hl/selections.py\", line 303, in broadcast\r\n chunks = tuple(x//y for x, y in zip(count, tshape))\r\n File \"/usr/lib/python3.6/site-packages/h5py/_hl/selections.py\", line 303, in <genexpr>\r\n chunks = tuple(x//y for x, y in zip(count, tshape))\r\nZeroDivisionError: integer division or modulo by zero\r\n```",
"repo": "h5py/h5py",
"source": "v2/experiments/train_data/opd_e4b_cispo_v5/verified_rft_messages.jsonl",
"source_sha256": "a43610ad0dfb6ace95375cfae09000f41afc0338cc925af870a4ade7a9b20c4c"
}{
"captured_at": "2026-11-12T17:06:59.476467+00:00",
"membership": "archived training",
"membership_evidence": "Task issues extracted from preserved verified_rft_messages training examples. This is not a verified current RL wave manifest.",
"name": "Preserved post-training task archive",
"source": "Autoresearch-Arena/gemma-4-developer-agent",
"source_revision": "016496de222aaafca0d4ee4c18efc63ba616f76e",
"sources": [
{
"path": "v2/experiments/train_data/opd_e4b_cispo_v5/verified_rft_messages.jsonl",
"sha256": "a43610ad0dfb6ace95375cfae09000f41afc0338cc925af870a4ade7a9b20c4c"
},
{
"path": "v2/experiments/train_data/opd_e4b_hybrid_v3/verified_rft_messages.jsonl",
"sha256": "bd326303eb127e8e5e08f03daf97bb88d79d19709d59f3f93f348bc56686a8df"
},
{
"path": "v2/experiments/train_data/opd_e4b_onpolicy_v3/verified_rft_messages.jsonl",
"sha256": "960c680e797e823a0d3a22f4b1d5ef60a72971373d703b877340b0c9126aaf68"
},
{
"path": "v2/experiments/train_data/opd_e4b_pure_v6a/verified_rft_messages.jsonl",
"sha256": "f045b7ca5b3883a1e2eaee81e1c02a4a1b53dd7b7b36e98bacb2ba5823a15148"
},
{
"path": "v2/experiments/train_data/opd_e4b_pure_v6b/verified_rft_messages.jsonl",
"sha256": "0f62460a9706eea5e1605255896f191ab00cb5706c5f1f2e1c293e9a718218dc"
},
{
"path": "v2/experiments/train_data/opd_e4b_pure_v7/verified_rft_messages.jsonl",
"sha256": "e37f7bd675322f3f81500b73559d60d5f602ca0537bf19f5cb06332c728c7b72"
},
{
"path": "v2/experiments/train_data/opd_e4b_pure_v7b/verified_rft_messages.jsonl",
"sha256": "b864bdc8695183433eef6e31cb8d33fad44ba3aded2170c1ade4ad5b2944ce23"
},
{
"path": "v2/experiments/train_data/opd_e4b_self_audit_v4/verified_rft_messages.jsonl",
"sha256": "0026023745afb8f3dc1c176dc7f7171157b4ad5a66656b524af218e8e19ceee6"
},
{
"path": "v2/experiments/train_data/rft_e4b_aligned_v2/verified_rft_messages.jsonl",
"sha256": "92a4515fee9d152b0d4c510ee3ce4caaaffe2003ba7584469f8027f174aab18c"
},
{
"path": "v2/experiments/train_data/rft_v1/verified_rft_messages.jsonl",
"sha256": "a42453ccd7ac7680b0a03865e8e7080bc8bf74c8d9d193b440c441ed46f8512b"
},
{
"path": "v2/experiments/train_data/rft_v2/verified_rft_messages.jsonl",
"sha256": "18f4b3bd7e651f83c6acab479c9475e3fa50dc652a384f309e97146983ac85ba"
}
]
}