| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
While I don't want to put a copy() method on every object, it makes sense here. With this method we make copying simpler and thus promote the needed copying at least for the transition period.
Milestoned for 3.4 - this should have been already introduced with the changes in 3.3. If we don't get it in 3.4 a major purpose ( the easier user-copy workaround in the transition period) is gone.
Sorry, something went wrong.
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
|
Agreed, that we definitely don't want a copy method on everything. But most classes aren't primarily coming from global instances, and hence usually can be made from scratch. Whereas colormaps are probably 99% coming from the global list, so I think we should make it easy to move into user scope. |
Sorry, something went wrong.
…663-on-v3.4.x Backport PR #19663 on branch v3.4.x (ENH: add a copy method to colormaps)
| Back | FazBrowse Home | New Git URL |
PR Summary
Right now we are deprecating access to the global colormaps, but users can only avoid it by doing newcmap = copy.copy(cmap) which is a bit heavy-handed. Here we provide a simple copy method to Colormap so we can do newcmap = cmap.copy().
See discussion in #19609, #16991, #18503
PR Checklist