Answers for "Python NumPy asfortranarray Function Scalar to an array"

0

Python NumPy asfortranarray Function Scalar to an array

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

import numpy as np

my_scalar = 50

print ("Input scalar : ", my_scalar)
	
out_arr = np.asfortranarray(my_scalar, dtype ='float')
print ("output fortan array from input scalar : ", out_arr)
Posted by: Guest on April-24-2022

Code answers related to "Python NumPy asfortranarray Function Scalar to an array"

Python Answers by Framework

Browse Popular Code Answers by Language