DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
replace matrix values python
>>> A = np.array((1,7,3,8,4,9,1)) >>> np.where(A>4,1,A) array([1, 1, 3, 1, 4, 1, 1])
Source by moonbooks.org #
PREVIOUS
NEXT
Tagged:
#replace
#matrix
#values
#python
ADD COMMENT
Topic
COMMENT
Name
8+2 =
Submit