On Tue, Jul 5, 2016 at 1:03 AM, Juan Nunez-Iglesias <[email protected]> wrote:
> On 4 July 2016 at 7:27:47 PM, Skip Montanaro ([email protected]) > wrote: > > Hashing it probably wouldn't work, too > great a chance for collisions. > > > If the string is ASCII, you can always interpret the bytes as part of an 8 > byte integer. Or, you can map unique values to consecutive integers. > IIUC np.nonzero(a[1] == a[:-1]) gives all changes independent of dtype. add or remove a 1 to adjust which element is indexed. (IIRC from a long time ago, arraysetops used/uses something like this.) Josef > > _______________________________________________ > NumPy-Discussion mailing list > [email protected] > https://mail.scipy.org/mailman/listinfo/numpy-discussion > >
_______________________________________________ NumPy-Discussion mailing list [email protected] https://mail.scipy.org/mailman/listinfo/numpy-discussion
