Skip to content

Conversation

@bjlittle
Copy link
Owner

@bjlittle bjlittle commented Mar 14, 2017

Ping @lbdreyer

@bjlittle
Copy link
Owner Author

@lbdreyer could you cast you eye over these changes to make sure you're happy with them. If you are then I'll merge (since you don't have merge rights on my repo 😉), otherwise comment on issue points and we'll discuss

# Setting the cube.data clears the cube.dtype and cube.fill_value.
# We want to maintain the fill_value for testing purposes, even
# though we have lost the lazy data in order to pin down the array
# data order to overcome testing on different architectures.

Choose a reason for hiding this comment

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

Should we be putting this comment everywhere we have done

fill_value = cube.fill_value
cube.data = ...
cube.fill_value = fill_value

Copy link
Owner Author

Choose a reason for hiding this comment

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

I've tried to leave some clue's (for my future self) but to be honest if we have a step change in the "persisting fill_value across a data setter operation" then we can always find the usage of fill_value in the code base.

I just added a bit more of context for concatenate because it's testing is a bit weird and, at the time, I thought an exception to the norm.

cube.data = ma.array(data, mask=mask, fill_value=fill_value)
cube.data = ma.array(data, mask=mask)
else:
# cube.data = np.copy(cube.data, order=order)

Choose a reason for hiding this comment

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

Do you know why these were commented out in the first place?

Copy link
Owner Author

Choose a reason for hiding this comment

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

It was changed by @pp-mo 3 years ago ... I don't see the need to keep them

@lbdreyer
Copy link

👍 Happy with the changes 👍

@bjlittle bjlittle merged commit b27917c into fill-value-and-dtype Mar 15, 2017
@bjlittle bjlittle deleted the fix-test-concatenate branch March 15, 2017 10:17
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.

3 participants