Skip to content

Regression in addcyclic behaviour #139

@ajdawson

Description

@ajdawson

Pull request #138 changed the behaviour of basemap.addcyclic. The data and longitude arrays are now being treated the same, i.e. the first point being appended to the end, but previously the longitude array was handled by adding the difference between longitudes to the last longitude, which is in my mind the correct behaviour.

An example:

import numpy as np
from mpl_toolkits.basemap import addcyclic

lons = np.arange(0, 360, 60)
data = np.ones([5, len(lons)]) * np.arange(len(lons))
new_data, new_lons = addcyclic(data, lons)
print new_lons

Prior to #138 being merged this would result in [0, 60, 120, 180, 240, 300, 360] but after it results in [0, 60, 120, 180, 240, 300, 0].

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