[GRASS-dev] problem using pygrass
Javier Martínez-López
javi.martinez.lopez at gmail.com
Wed Mar 5 00:59:10 PST 2014
Dear Pietro,
not all values are nan (consistently 5567600 out of 9476388 cells),
while importing other CELL maps (same region) works fine.
When I try this:
np.nanmax(epr22)
I get the follwing error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/majavie/anaconda/lib/python2.7/site-packages/numpy/lib/nanfunctions.py",
line 322, in nanmax
a, mask = _replace_nan(a, -np.inf)
File "/home/majavie/anaconda/lib/python2.7/site-packages/numpy/lib/nanfunctions.py",
line 63, in _replace_nan
np.copyto(a, val, where=mask)
TypeError: Cannot cast array data from dtype('int32') to dtype('bool')
according to the rule 'safe'
I will check it with the NC dataset and let you know... Thank you and
cheers, Javier
On Tue, Mar 4, 2014 at 7:52 PM, Pietro <peter.zamb at gmail.com> wrote:
> Hi Javier,
>
> On Tue, Mar 4, 2014 at 5:26 PM, Javier Martínez-López
> <javi.martinez.lopez at gmail.com> wrote:
>> Thank you Pietro! I will try again! However, there seems to be a bug
>> (at least in version 59147) since I am getting NaN values reading some
>> maps with RasterNumpy, which are perfectly fine when reading them
>> using grass70 version 57982... They are FCELL! Did you also notice
>> that?
>
> Please check that the region is set correctly... all the cells are
> Nan? check with:
>
> np.nanmax(raster)
>
> Are you able to reproduce the problem with the North Carolina dataset?
> If yes please send me the procedure... and I will try to fix it.
>
> All the best
>
> Pietro
More information about the grass-dev
mailing list