Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python NumPy asscalar Function Example 02

# welcome to softhunt.net
# Python program explaining
# numpy.asscalar() function
import numpy as np

in_list = [34]

# changing the list to size 1 array
arr = np.array(in_list)

print ("Input array from list : ", arr)

# changing the array to scalar
scalar = np.asscalar(arr)

print ("output scalar from input list : ", scalar)
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Python #NumPy #asscalar #Function #Example
ADD COMMENT
Topic
Name
7+3 =