Skip to content

basemap crashes with no error message when passed numpy nan's #5991

@mnky9800n

Description

@mnky9800n

When passing a value when creating the Basemap object, if that value is a numpy.nan then python 2.x crashes on windows.

This example code crashes in an ipython 2.7 notebook.

minlat = np.nan
maxlat = np.nan
minlon = np.nan
maxlon = np.nan
m = Basemap(projection='merc'
            , llcrnrlat=minlat
            , urcrnrlat=maxlat
            , llcrnrlon=minlon
            , urcrnrlon=maxlon)

I think the expected behavior would be a ValueError or something like that so that it is easier to debug. Instead of a message like this:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions