Answers for "Python NumPy asanyarray Function Example Scalar to an array"

0

Python NumPy asanyarray Function Example Scalar to an array

# welcome to softhunt.net
# Python program explaining
# numpy.asanyarray() function

import numpy as np

my_scalar = 12

print ("Input scalar : ", my_scalar)
	
out_arr = np.asanyarray(my_scalar)
print ("output array from input scalar : ", out_arr)
print(type(out_arr))
Posted by: Guest on April-24-2022

Python Answers by Framework

Browse Popular Code Answers by Language