Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

PREVIOUS NEXT
Code Example
Python :: python pandas reading pickelt 
Python :: vertical line in matplotlib 
Python :: datetime python 
Python :: python regex to match ip address 
Python :: access last element of list python 
Python :: matplotlib display axis in scientific notation 
Python :: how to make a flask server in python 
Python :: chiffre cesar python 
Python :: how to fill an array with consecutive numbers 
Python :: add day in date python 
Python :: selenium send keys python 
Python :: how to use python to open camera app using python 
Python :: binning dat adataframe 
Python :: how to print text after an interger 
Python :: tsv to csv python 
Python :: python stack class 
Python :: how to get started with python 
Python :: python print dictionary line by line 
Python :: neat python full form 
Python :: remove too short strings from a list python 
Python :: ros python subscriber 
Python :: python list group by count 
Python :: how to add column headers in pandas 
Python :: regex all words longer than n 
Python :: python print time difference 
Python :: redirect django 
Python :: python localhost 
Python :: python strftime iso 8601 
Python :: managing media in django 
Python :: python text underline 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =