This commit is contained in:
Grant Sanderson 2022-12-15 10:11:58 -08:00
parent 6c4e028eab
commit a39c65cb5c

View file

@ -167,7 +167,7 @@ def project_along_vector(point: np.ndarray, vector: np.ndarray) -> np.ndarray:
def normalize_along_axis(
array: np.ndarray,
axis: np.ndarray,
axis: int,
) -> np.ndarray:
norms = np.sqrt((array * array).sum(axis))
norms[norms == 0] = 1