Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

numpy array input

n, m = map(int, input().split()) # taking number of rows and column
array = numpy.array([input().strip().split() for _ in range(n)], int)
Comment

input numpy array

import numpy

my_array = []
a = int(input("Size of array:"))
for i in range(a):
    my_array.append(float(input("Element:")))
my_array = numpy.array(my_array)
print(numpy.floor(my_array))
Comment

PREVIOUS NEXT
Code Example
Python :: calculate mean on python 
Python :: pandas df num rows 
Python :: en_core_web_sm 
Python :: split a string with 2 char each in python 
Python :: fork function in python 
Python :: python list elements 
Python :: query with condition django 
Python :: How to loop over grouped Pandas dataframe? 
Python :: clean column names pandas 
Python :: python insert sorted list 
Python :: multiple bar graph in python 
Python :: python file directory 
Python :: drop first two rows pandas 
Python :: python for loop get iteration number 
Python :: how to create a python server 
Python :: urllib request 
Python :: python list of dictionaries to excel 
Python :: check type of django messages 
Python :: circular list python 
Python :: # extract an email ID from the text using regex 
Python :: pyspark print a column 
Python :: pyspark now 
Python :: pytube sample script 
Python :: how to bulk update in mongodb using python 
Python :: strp datetime 
Python :: python - find specific name in a df 
Python :: python check if list contains 
Python :: python 3.7 download for windows 7 32-bit 
Python :: divisible in python 
Python :: audioplayer python 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =