DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
convert all values in array into float
import
numpy
as
np x
=
np
.
array
(
[
'1.1'
,
'2.2'
,
'3.3'
]
)
y
=
x
.
astype
(
np
.
float
)
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#convert
#values
#array
#float
ADD COMMENT
Topic
COMMENT
Name
1+4 =
Submit