Skip to content

Deprecate proj3d.mod. #13020

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

Merged
merged 1 commit into from
Feb 12, 2019
Merged

Deprecate proj3d.mod. #13020

merged 1 commit into from
Feb 12, 2019

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Dec 19, 2018

Having a function named mod that doesn't do % but computes the norm of a
vector is just a good way to trip the reader (yes, I know about the term
"modulus of a vector", but still).

Also vectorize a normals calculation.

Also we can use % instead of np.mod elsewhere.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzer anntzer added this to the v3.1 milestone Dec 19, 2018
for n in normals])
with np.errstate(invalid="ignore"):
shade = ((normals / np.linalg.norm(normals, axis=1, keepdims=True))
@ lightsource.direction)
Copy link
Member

Choose a reason for hiding this comment

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

OK, I couldn't even google this one. What does the @ operator do?

Copy link
Member

Choose a reason for hiding this comment

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

That‘s a new operator introduced in python 3. Numpy uses it for matrix multiplication. a @ b is the same as np.dot(a, b), just more readable.

@QuLogic
Copy link
Member

QuLogic commented Dec 23, 2018

xref #13030

@anntzer
Copy link
Contributor Author

anntzer commented Dec 23, 2018

I can rebase this on top of #13030 once it is merged, no problem.

Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

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

Blocking only to make sure @WeatherGod has a chance to look at this.

@WeatherGod should dismiss this.

@jklymak jklymak dismissed tacaswell’s stale review February 6, 2019 01:35

weather god approved

@jklymak
Copy link
Member

jklymak commented Feb 6, 2019

Confused if this should be merged given #13030, of if #13030 will be merged. If its not a problem, anyone can merge.

@QuLogic
Copy link
Member

QuLogic commented Feb 6, 2019

@anntzer agreed to wait, above.

Having a function named mod that doesn't do % but computes the norm of a
vector is just a good way to trip the reader (yes, I know about the term
"modulus of a vector", but still).

Also vectorize a normals calculation.

Also we can use % instead of np.mod elsewhere.
@anntzer
Copy link
Contributor Author

anntzer commented Feb 12, 2019

rebased and removed the deprecation notice, as #13030 already takes care of that

@QuLogic QuLogic merged commit 665cf51 into matplotlib:master Feb 12, 2019
@anntzer anntzer deleted the proj3dmod branch February 13, 2019 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants