mirror of
https://github.com/3b1b/manim.git
synced 2025-09-19 04:41:56 +00:00
Fix normalize_along_axis
This commit is contained in:
parent
5af4b9cc65
commit
a4d47f64b0
1 changed files with 1 additions and 2 deletions
|
@ -178,8 +178,7 @@ def normalize_along_axis(
|
|||
norms = np.sqrt((array * array).sum(axis))
|
||||
norms[norms == 0] = 1
|
||||
buffed_norms = np.repeat(norms, array.shape[axis]).reshape(array.shape)
|
||||
array /= buffed_norms
|
||||
return array
|
||||
return array / buffed_norms
|
||||
|
||||
|
||||
def get_unit_normal(
|
||||
|
|
Loading…
Add table
Reference in a new issue