Skip to content

axis.clone does not clone anymore! #271

@doutriaux1

Description

@doutriaux1
import cdms2
import cdat_info
import MV2

f= cdms2.open(cdat_info.get_sampledata_path()+"/clt.nc")
s = f("clt", **{})
#s.info()

s = s(
    latitude=(
        20, 20, "cob"), longitude=(
        112, 112, "cob"), squeeze=1)
s2 = MV2.sin(s)

ax = s2.getTime()
print "FIRST VAL:",ax[0]
ax2 = ax.clone()
ax2.toRelativeTime("days since 30000")
print("FIRST VALUE UNCHANGED?",ax[0])

Original axes values have been changed this has been introduced in the last commit.
Thanks @muryanto1 for spotting the regression in vcs nighlties

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions