-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Deprecate proj3d.mod. #13020
Conversation
for n in normals]) | ||
with np.errstate(invalid="ignore"): | ||
shade = ((normals / np.linalg.norm(normals, axis=1, keepdims=True)) | ||
@ lightsource.direction) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
xref #13030 |
I can rebase this on top of #13030 once it is merged, no problem. |
There was a problem hiding this 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.
@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.
rebased and removed the deprecation notice, as #13030 already takes care of that |
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