Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to union value without the same value in numpy

import numpy as np

c = np.array(set(a).symmetric_difference(b))

#Pure numpy 
c = np.setdiff1d(np.union1d(a, b), np.intersect1d(a, b))
Comment

PREVIOUS NEXT
Code Example
Python :: flask on gevent over https 
Python :: slack bot error not_in_channel 
Python :: Looping and counting in python 
Python :: how to declare private attribute in python 
Python :: Python: Extracting XML to DataFrame (Pandas) 
Python :: how to get the length of a string in python 
Python :: dataframe print column 
Python :: trim string to max length python 
Python :: file storage django 
Python :: python os get dir path 
Python :: .first() in django 
Python :: python run bat in new cmd window 
Python :: remove item from list 
Python :: string python 
Python :: get mode using python 
Python :: python binary 
Python :: upload bytes to s3 python 
Python :: tkinter mainloop 
Python :: python indentation 
Python :: how to make lowercase text in python 
Python :: python is prime 
Python :: Remove whitespace from str 
Python :: python printing hello world 
Python :: print to file python 
Python :: python area calculator 
Python :: python unpacking 
Python :: python does string contain space 
Python :: how to add elements to a dictionary 
Python :: pd.concat has nan 
Python :: python keyboard input arrow keys 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =