mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 08:47:44 +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 = np.sqrt((array * array).sum(axis))
|
||||||
norms[norms == 0] = 1
|
norms[norms == 0] = 1
|
||||||
buffed_norms = np.repeat(norms, array.shape[axis]).reshape(array.shape)
|
buffed_norms = np.repeat(norms, array.shape[axis]).reshape(array.shape)
|
||||||
array /= buffed_norms
|
return array / buffed_norms
|
||||||
return array
|
|
||||||
|
|
||||||
|
|
||||||
def get_unit_normal(
|
def get_unit_normal(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue