2012-08-24 19:23:09 |
Julian Taylor |
description |
1.
Description: Ubuntu 12.04.1 LTS
Release: 12.04
2.
python-scientific:
Installed: 2.8-2build1
Candidate: 2.8-2build1
Version table:
*** 2.8-2build1 0
500 http://dk.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
100 /var/lib/dpkg/status
3.
python -c "import numpy as np; import Scientific.IO.NetCDF as nc; ncf = nc.NetCDFFile('t.nc','w'); ncf.createDimension('dim2', 2); ncf.createDimension('n',2); sym = ncf.createVariable('d','c',('n','dim2')); sym[:] = [' C', ' O']; print sym[:]"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ValueError: could not convert string to float: C
4.
This is probably due to python-scientific being built with an older version of python-numpy (or python?).
After rebuilding python-scientific according to http://www.debian-administration.org/articles/20
and installing the resulting python-netcdf the above one-liner works. |
Impact:
due to a yet unknown incompatibility with its dependencies several functionalities of python-scientific are broken and give unclear error message.
A rebuild fixes the issues.
TEST CASE:
python -c "import numpy as np; import Scientific.IO.NetCDF as nc; ncf = nc.NetCDFFile('t.nc','w'); ncf.createDimension('dim2', 2); ncf.createDimension('n',2); sym = ncf.createVariable('d','c',('n','dim2')); sym[:] = [' C', ' O']; print sym[:]"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ValueError: could not convert string to float: C
expected:
[[' ' 'C']
[' ' 'O']]
TEST CASE:
should not crash:
#!/usr/bin/env python
import numpy
import Scientific.IO.NetCDF as netcdf
handle = netcdf.NetCDFFile("test.nc", "w")
handle.test = numpy.array(1.0)
handle.close()
Regression potential:
Only a rebuild no change to the source.
original report:
1.
Description: Ubuntu 12.04.1 LTS
Release: 12.04
2.
python-scientific:
Installed: 2.8-2build1
Candidate: 2.8-2build1
Version table:
*** 2.8-2build1 0
500 http://dk.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
100 /var/lib/dpkg/status
3.
python -c "import numpy as np; import Scientific.IO.NetCDF as nc; ncf = nc.NetCDFFile('t.nc','w'); ncf.createDimension('dim2', 2); ncf.createDimension('n',2); sym = ncf.createVariable('d','c',('n','dim2')); sym[:] = [' C', ' O']; print sym[:]"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ValueError: could not convert string to float: C
4.
This is probably due to python-scientific being built with an older version of python-numpy (or python?).
After rebuilding python-scientific according to http://www.debian-administration.org/articles/20
and installing the resulting python-netcdf the above one-liner works. |
|