Skip to content

Conversation

@marqh
Copy link
Member

@marqh marqh commented May 15, 2017

proposed replacement for #2468

targeting master for the 1.13 release

# of this message. The file pointer offset is always at the end
# of the current message due to the grib-api reading the message.
proxy = GribDataProxy(shape, np.zeros(0).dtype, np.nan,
proxy = GribDataProxy(shape, np.array([0.]).dtype, np.nan,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't understand why this needs to be done rather than np.float_ (as suggested in this comment). Surely it just needs a float datatype?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I spoke to Dan about this he suggested that this is because at some point in the future, numpy might mess about with np.float as a datatype, so this method is more robust.

@lbdreyer lbdreyer merged commit cbb042f into SciTools:master May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants