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

1.3rc1: TestDisplayWorldCoordinate.test_cube_coords fails on MIPS #5601

Closed
olebole opened this issue Dec 13, 2016 · 5 comments
Closed

1.3rc1: TestDisplayWorldCoordinate.test_cube_coords fails on MIPS #5601

olebole opened this issue Dec 13, 2016 · 5 comments

Comments

@olebole
Copy link
Member

olebole commented Dec 13, 2016

On MIPS platforms, the TestDisplayWorldCoordinate.test_cube_coords test fails during the Debian build:

Full Python Version: 
2.7.13rc1 (default, Dec  4 2016, 14:12:39) 
[GCC 6.2.1 20161124]

encodings: sys: ascii, locale: ANSI_X3.4-1968, filesystem: ANSI_X3.4-1968, unicode bits: 20
byteorder: big
float info: dig: 15, mant_dig: 15

Numpy: 1.11.2
Scipy: 0.18.1
Matplotlib: 1.5.3
h5py: not available
Pandas: not available
Cython: 0.25.2b0
Using Astropy options: remote_data.

[...]
self = <astropy.visualization.wcsaxes.tests.test_display_world_coordinates.TestDisplayWorldCoordinate object at 0x6c260930>
tmpdir = local('/tmp/pytest-of-buildd/pytest-0/test_cube_coords0')

    def test_cube_coords(self, tmpdir):
        wcs = WCS(self.cube_header)
    
        fig = plt.figure(figsize=(4, 4))
        canvas = fig.canvas
    
        ax = WCSAxes(fig, [0.1, 0.1, 0.8, 0.8], wcs=wcs, slices=('y', 50, 'x'))
        fig.add_axes(ax)
    
        # On some systems, fig.canvas.draw is not enough to force a draw, so we
        # save to a temporary file.
>       fig.savefig(tmpdir.join('test.png').strpath)

astropy/visualization/wcsaxes/tests/test_display_world_coordinates.py:107: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python2.7/dist-packages/matplotlib/figure.py:1563: in savefig
    self.canvas.print_figure(*args, **kwargs)
/usr/lib/python2.7/dist-packages/matplotlib/backend_bases.py:2232: in print_figure
    **kwargs)
/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_agg.py:527: in print_png
    FigureCanvasAgg.draw(self)
/usr/lib/python2.7/dist-packages/matplotlib/backends/backend_agg.py:474: in draw
    self.figure.draw(self.renderer)
/usr/lib/python2.7/dist-packages/matplotlib/artist.py:62: in draw_wrapper
    draw(artist, renderer, *args, **kwargs)
/usr/lib/python2.7/dist-packages/matplotlib/figure.py:1159: in draw
    func(*args)
astropy/visualization/wcsaxes/core.py:335: in draw
    ticklabels_bbox=self._ticklabels_bbox)
astropy/visualization/wcsaxes/coordinate_helpers.py:434: in _draw
    self._update_ticks()
astropy/visualization/wcsaxes/coordinate_helpers.py:486: in _update_ticks
    tick_world_coordinates, self._fl_spacing = self.locator(*coord_range[self.coord_index])
astropy/visualization/wcsaxes/formatter_locator.py:268: in locator
    values = self._locate_values(value_min, value_max, spacing_deg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

value_min = 30.621389143656998, value_max = 30.621389143656998, spacing = 0.0

    @staticmethod
    def _locate_values(value_min, value_max, spacing):
        imin = np.ceil(value_min / spacing)
        imax = np.floor(value_max / spacing)
>       values = np.arange(imin, imax + 1, dtype=int)
E       ValueError: array is too big; `arr.size * arr.dtype.itemsize` is larger than the maximum possible size.

astropy/visualization/wcsaxes/formatter_locator.py:99: ValueError

Full log here. The same happens on mip64el and sparc64. Other platforms (arm64, powerpc etc.) are fine.
This almost looks like a matplotlib problem; so I will disable this test on the Debian build.

@astrofrog
Copy link
Member

Thanks for the report - we should probably still fix _locate_values to give a proper error if spacing is 0

@olebole
Copy link
Member Author

olebole commented Dec 13, 2016

I'd revert my assumption that it is a matplotlib problem.

Quickly checking though the code, I did't see a place where spacing could be set to 0. -- in this specific case (value_max == value_min; is this correct??) it should be the base_spacing.

(BTW, the marked range doesn't have fallback if both self.spacing and self.number are None, which is not generally excluded by the code).

@pllim pllim added this to the v1.3.0 milestone Dec 13, 2016
@eteq eteq modified the milestones: v1.3.0, v1.3.1 Jan 4, 2017
@bsipocz bsipocz modified the milestones: v1.3.2, v1.3.1 Mar 4, 2017
@bsipocz bsipocz modified the milestones: v1.3.2, v1.3.3 Mar 30, 2017
@bsipocz bsipocz removed this from the v1.3.3 milestone May 23, 2017
@bsipocz
Copy link
Member

bsipocz commented Jul 4, 2017

@olebole - would you please check whether it's still an issue for 2.0rc1?

@olebole
Copy link
Member Author

olebole commented Jul 4, 2017

I am just preparing to test this and the others. I'll report back on success.

@olebole
Copy link
Member Author

olebole commented Jul 10, 2017

I can confirm that this works now (2.0rc1) for MIPS. Closing.

@olebole olebole closed this as completed Jul 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants