Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy multiply by inverse square root of value

import numpy as np

arr = np.random.uniform(0, 1, 10000)

#Inverse Square Root
1 / np.sqrt(arr)

#Divide number by np.sqrt() instead of multiplying by inverse
x / np.sqrt(arr)
#x can be a value, an array or a matrix
 
PREVIOUS NEXT
Tagged: #numpy #multiply #inverse #square #root
ADD COMMENT
Topic
Name
8+7 =