10 Aug
2015
10 Aug
'15
4:09 p.m.
Just came across this one today:
np.in1d([1], set([0, 1, 2]), assume_unique=True) array([ False], dtype=bool) np.in1d([1], [0, 1, 2], assume_unique=True) array([ True], dtype=bool)
I am assuming this has something to do with the fact that order is not guaranteed with set() objects? I was kind of hoping that setting "assume_unique=True" would be sufficient to overcome that problem. Should sets be rejected as an error? This was using v1.9.0 Cheers! Ben Root
3153
Age (days ago)
3153
Last active (days ago)
4 comments
5 participants
participants (5)
-
Benjamin Root
-
Benjamin Root
-
josef.pktd@gmail.com
-
Nathaniel Smith
-
Sebastian Berg