Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

numpy drop duplicates

import numpy as np
array = np.array([0,1,0])
print(np.unique(array))
>> [0 1]
Comment

PREVIOUS NEXT
Code Example
Python :: connection to server at "" (), port 5432 failed: timeout expired 
Python :: python close database connection 
Python :: unix command in python script 
Python :: python get response from url 
Python :: python open file 
Python :: count rows with nan pandas 
Python :: save and load model pytorch 
Python :: case insensitive replace python 
Python :: creating venv on vscode linux 
Python :: python selenium find by class name 
Python :: calcutalte average python 
Python :: python reverse split only once 
Python :: pandas convert series of datetime to date 
Python :: Simple way to measure cell execution time in ipython notebook 
Python :: networkx path between two nodes 
Python :: reverse geocoding python 
Python :: combine two dictionary adding values for common keys 
Python :: numpy empty image 
Python :: multiple arguments in python 
Python :: python tabulate float format 
Python :: python list empty 
Python :: How to search where a character is in an array in python 
Python :: check if string is empty python 
Python :: accessing index of dataframe python 
Python :: plt opacity hist 
Python :: how to change turtle shape in python 
Python :: what should you call a decimal value in python 
Python :: infix to postfix python code 
Python :: loop through list of tuples python 
Python :: how to change font in tkinter 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =