Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portrait plot issues #146

Closed
durack1 opened this issue Mar 13, 2017 · 9 comments
Closed

Portrait plot issues #146

durack1 opened this issue Mar 13, 2017 · 9 comments
Labels
Milestone

Comments

@durack1
Copy link
Member

durack1 commented Mar 13, 2017

It seems something in vcs=2.8 has changed so that the following error occurs:

>>> cdat_info.version()
['', 'v2.8']
(PMP) bash-4.1$ python portrait-3obs.py
/home/p1d/anaconda2/envs/PMP/lib/python2.7/site-packages/numpy/ma/core.py:3337: MaskedArrayFutureWarning: setting an item on a masked array which has a shared mask will not copy the mask and also change the original mask array in the future.
Check the NumPy 1.11 release notes for more information.
  self.__setitem__(slice(i, j), value)
Traceback (most recent call last):
  File "portrait-3obs.py", line 131, in <module>
    P.plot(out1_rel,x=x,multiple=1.3,bg=1)
  File "/home/p1d/anaconda2/envs/PMP/lib/python2.7/site-packages/pcmdi_metrics/graphics/portraits.py", line 983, in plot
    x.plot(MV2.ravel(data), M, template, meshfill, bg=bg)
  File "/home/p1d/anaconda2/envs/PMP/lib/python2.7/site-packages/vcs/Canvas.py", line 2564, in plot
    a = self.__plot(arglist, keyargs)
  File "/home/p1d/anaconda2/envs/PMP/lib/python2.7/site-packages/vcs/Canvas.py", line 3893, in __plot
    returned_kargs = self.backend.plot(*arglist, **keyargs)
  File "/home/p1d/anaconda2/envs/PMP/lib/python2.7/site-packages/vcs/VTKPlots.py", line 608, in plot
    vtk_backend_grid, vtk_backend_geo, **kargs))
  File "/home/p1d/anaconda2/envs/PMP/lib/python2.7/site-packages/vcs/vcsvtk/pipeline2d.py", line 285, in plot
    self._min = self._data1.min()
  File "/home/p1d/anaconda2/envs/PMP/lib/python2.7/site-packages/numpy/ma/core.py", line 5472, in min
    axis=axis, out=out, **kwargs).view(type(self))
  File "/home/p1d/anaconda2/envs/PMP/lib/python2.7/site-packages/numpy/core/_methods.py", line 29, in _amin
    return umr_minimum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation minimum which has no identity

@doutriaux1 @danlipsa is this related to #117 and #119 do you think?

@durack1
Copy link
Member Author

durack1 commented Mar 13, 2017

@doutriaux1 what is the over ride for installing vcs-nox rather than the default? I was using:

conda create -n PMP -c conda-forge -c uvcdat -c pcmdi pcmdi_metrics

@durack1
Copy link
Member Author

durack1 commented Mar 14, 2017

@doutriaux1 self help:

conda create -n PMP -c conda-forge -c uvcdat -c pcmdi pcmdi_metrics-nox

I had forgotten that @zshaheen had sorted us out nightlies.. @zshaheen how hard would it be to push a -nox for the v1.1.1?

@zshaheen
Copy link

@durack1 It's not too bad, I get to it tomorrow.

@durack1
Copy link
Member Author

durack1 commented Mar 14, 2017

Excellent thanks! Some folks at GFDL can't use the non-nox version and our test cases for them were all built pre-CDP.. quickest path forward is a v1.1.1-nox..

@durack1
Copy link
Member Author

durack1 commented Mar 14, 2017

@doutriaux1 I have just tested this against the PMP-v1.1.1-nox that @zshaheen generated for me and I am still getting the issue, so something has changed in vcs:

(PMP-nox) bash-4.1$ python portrait-3obs.py
/home/p1d/anaconda2/envs/PMP-nox/lib/python2.7/site-packages/numpy/ma/core.py:3337: MaskedArrayFutureWarning: setting an item on a masked array which has a shared mask will not copy the mask and also change the original mask array in the future.
Check the NumPy 1.11 release notes for more information.
  self.__setitem__(slice(i, j), value)
Traceback (most recent call last):
  File "portrait-3obs.py", line 131, in <module>
    P.plot(out1_rel,x=x,multiple=1.3)
  File "/home/p1d/anaconda2/envs/PMP-nox/lib/python2.7/site-packages/pcmdi_metrics/graphics/portraits.py", line 983, in plot
    x.plot(MV2.ravel(data), M, template, meshfill, bg=bg)
  File "/home/p1d/anaconda2/envs/PMP-nox/lib/python2.7/site-packages/vcs/Canvas.py", line 2564, in plot
    a = self.__plot(arglist, keyargs)
  File "/home/p1d/anaconda2/envs/PMP-nox/lib/python2.7/site-packages/vcs/Canvas.py", line 3893, in __plot
    returned_kargs = self.backend.plot(*arglist, **keyargs)
  File "/home/p1d/anaconda2/envs/PMP-nox/lib/python2.7/site-packages/vcs/VTKPlots.py", line 608, in plot
    vtk_backend_grid, vtk_backend_geo, **kargs))
  File "/home/p1d/anaconda2/envs/PMP-nox/lib/python2.7/site-packages/vcs/vcsvtk/pipeline2d.py", line 285, in plot
    self._min = self._data1.min()
  File "/home/p1d/anaconda2/envs/PMP-nox/lib/python2.7/site-packages/numpy/ma/core.py", line 5472, in min
    axis=axis, out=out, **kwargs).view(type(self))
  File "/home/p1d/anaconda2/envs/PMP-nox/lib/python2.7/site-packages/numpy/core/_methods.py", line 29, in _amin
    return umr_minimum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation minimum which has no identity

Is this a bug, or have the vcs options changed? The offending code is:

P.plot(out1_rel,x=x,multiple=1.3)

@durack1
Copy link
Member Author

durack1 commented Mar 14, 2017

@doutriaux1 FYI, with missing (no data) I am getting the following error:

Warning: In /export/doutriaux1/anaconda2/conda-bld/vtk-cdat_1479229648549/work/Filters/Geometry/vtkDataSetSurfaceFilter.cxx, line 166
vtkDataSetSurfaceFilter (0x3043b80): Number of cells is zero, no data to process.

@doutriaux1
Copy link
Contributor

@durack1 i gthought we established you were sending it an array shaped (10,0) hence the bug. Is there anything else? Also portraits plot are not officially in vcs as far as i remember so it really should go to pmp issues

@durack1
Copy link
Member Author

durack1 commented Mar 14, 2017

@doutriaux1 I think you're right, and it's most likely a user (or was there another definition that we decided upon) error, the only valid post above is #146 (comment) which seems a bit vague and includes the conda-bld path, so is useless for an end user

@durack1
Copy link
Member Author

durack1 commented Mar 22, 2017

@doutriaux1 @zshaheen closing this and will open another issue about the debug info

@durack1 durack1 closed this as completed Mar 22, 2017
@doutriaux1 doutriaux1 modified the milestone: 2.10 May 5, 2017
@doutriaux1 doutriaux1 added the bug label May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants