Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field should return copies instead of in-place editing. #75

Closed
skuschel opened this issue Sep 13, 2017 · 3 comments
Closed

Field should return copies instead of in-place editing. #75

skuschel opened this issue Sep 13, 2017 · 3 comments
Labels
enhancement Field core routines affected incompatible change This change may create incompatibilities

Comments

@skuschel
Copy link
Owner

skuschel commented Sep 13, 2017

The Field object is basically a numpy array plus axes and labels. Therefore it may be more intuitive to be able to use it as a numpy array:

  • Be immutable. Functions should not change the current object but rather return the changed object
  • Interact with numpys ufuncs, such that np.abs can work with a Field object and return a Field object.
  • postpic.MultiSpecies should probably also behave like that. Check first, if this has mayor performance implications
@skuschel skuschel added Field core routines affected incompatible change This change may create incompatibilities enhancement labels Sep 13, 2017
@skuschel
Copy link
Owner Author

Immutability done in #79

@skuschel skuschel changed the title Make Field behave as a numpy array Field should return copies instead of in-place editing. Oct 13, 2017
@skuschel
Copy link
Owner Author

Regarding particles, see #101

@skuschel skuschel reopened this Oct 13, 2017
@skuschel
Copy link
Owner Author

Regarding the numpy interoperability, see #102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Field core routines affected incompatible change This change may create incompatibilities
Projects
None yet
Development

No branches or pull requests

1 participant