runtime warning from numpy about invalid value in cast
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start by reproducing the warning with the attached zero.cdl.txt example and the shown cf-python and NumPy versions. Trace the n.dim('T').dump() path that emits the masked-array cast warning; done means the example runs without the RuntimeWarning while preserving the displayed time coordinate output.
Written by the indexing model from the issue text.
Description
There's an example field in the attached zero.cdl.txt. The following produces the warning "/usr/share/anaconda3/lib/python3.8/site-packages/numpy/ma/core.py:467: RuntimeWarning: invalid value encountered in cast".
>>> cf.__version__
'3.14.1'
>>> numpy.__version__
'1.24.2'
n=cf.read('zero.nc')[0]
>>> n.dim('T').dump()
/usr/share/anaconda3/lib/python3.8/site-packages/numpy/ma/core.py:467: RuntimeWarning: invalid value encountered in cast
fill_value = np.array(fill_value, copy=False, dtype=ndtype)
Dimension coordinate: time
axis = 'T'
calendar = '360_day'
standard_name = 'time'
units = 'days since 2007-1-1'
Data(294) = [2007-01-01 00:00:00, ..., 2300-01-01 00:00:00] 360_day
- Dominant language
- Python
- Stars
- 32
- Forks
- 14
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NCAS-CMS/cfdm
-
Convert to/from iris cubesPossibly taken @davidhassell claimed this 4 days ago. Openenhancement
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Convert from/to `xarray`Possibly taken @davidhassell claimed this 6 days ago. Opendataset read dataset write enhancement xarray
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 57/100
-
documentation
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Conformance: UGRID check failure reporting missing attrMay be free again @sadielbartholomew claimed this 66 days ago, and no pull request is open. Openbug UGRID
Similar issues
-
eegprep-lean: set channel types from the Zarr group's channel_typePossibly taken @claude claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
sccn/eegprep#668 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
blacklanternsecurity/bbot#3679 ·
Maintainers usually reply within 2 days
-
Link Checker ReportOpenBot Type: Bug Type: Documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
speakeasy-api/speakeasy#2159 ·
Maintainers usually reply within 1 day