Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

check odd numbers numpy

# Input
arr = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
arr[arr % 2 == 1]
#> array([1, 3, 5, 7, 9])
Comment

PREVIOUS NEXT
Code Example
Python :: how to add two different times in python 
Python :: python spammer messages 
Python :: change the default python version mac 
Python :: check package version jupyter python 
Python :: how to check if a string ends with a substring python 
Python :: python date 
Python :: pandas set font size plot 
Python :: trim text python 
Python :: click js selenium python 
Python :: normalize column pandas 
Python :: where my python modules in linux 
Python :: how to square each term of numpy array python 
Python :: pip install ffmpeg 
Python :: to int in pandas 
Python :: open a web page using selenium python 
Python :: get max pixel value python 
Python :: keyboard listener python 
Python :: check iterable python 
Python :: Unable to locate package python3.6-venv 
Python :: values outside range pandas 
Python :: read txt in pandas 
Python :: pyplot set x range 
Python :: python has duplicates 
Python :: regex to find ip address python 
Python :: asyncio wirte to text python 
Python :: prekladac 
Python :: matplotlib plot 
Python :: pandas plot use index as x 
Python :: python volver al principio 
Python :: what do i do if my dog eats paper 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =