indices

A sparse boolean array, i.e., set of indices.

Usage

indices(
    *args,
    **kwargs,
)

Provides a memory efficient set interface, with optimized conversion between numpy arrays.

Parameters

keys: Iterable
optional iterable of keys

Attributes

Name Description
__pyx_vtable__ Capsule objects let you wrap a C “void *” pointer in a Python

__pyx_vtable__

Capsule objects let you wrap a C “void *” pointer in a Python

pyx_vtable=<capsule object NULL at 0x7fb38c7f3210>

object. They’re a way of passing data through the Python interpreter without creating your own custom type.

Capsules are used for communication between extension modules. They provide a way for an extension module to export a C interface to other extension modules, so that extension modules can use the Python import mechanism to link to one another.

Methods

Name Description
__array__() Return keys as numpy array.
__contains__() Return bool(key in self).
__eq__() Return self==value.
__ge__() Return self>=value.
__gt__() Return self>value.
__init__() Initialize self. See help(type(self)) for accurate signature.
__ior__() Return self|=value.
__isub__() Return self-=value.
__iter__() Implement iter(self).
__ixor__() Return self^=value.
__le__() Return self<=value.
__len__() Return len(self).
__lt__() Return self<value.
__matmul__() Return binary dot product, i.e., intersection count.
__ne__() Return self!=value.
__new__() Create and return a new object. See help(type) for accurate signature.
__rand__() Return value&self.
__repr__() Return repr(self).
__rmatmul__() Return value@self.
__ror__() Return value|self.
__rsub__() Return value-self.
__rxor__() Return value^self.
add() Add an index key.
clear() Remove all indices.
difference() Return the difference of sets as a new set.
discard() Remove an index key, if present.
dot() Return the intersection count of sets.
fromdense() Return indices from a dense array representation.
intersection() Return the intersection of sets as a new set.
isdisjoint() Return whether two indices have a null intersection.
todense() Return a dense array representation of indices.
union() Return the union of sets as a new set.
update() Update from indices, arrays, or iterables.

__array__()

Return keys as numpy array.

Usage

__array__(dtype=int64, copy=None)

__contains__()

Return bool(key in self).

Usage

__contains__(key)

__eq__()

Return self==value.

Usage

__eq__(value)

__ge__()

Return self>=value.

Usage

__ge__(value)

__gt__()

Return self>value.

Usage

__gt__(value)

__init__()

Initialize self. See help(type(self)) for accurate signature.

Usage

__init__(*args, **kwargs)

__ior__()

Return self|=value.

Usage

__ior__(value)

__isub__()

Return self-=value.

Usage

__isub__(value)

__iter__()

Implement iter(self).

Usage

__iter__()

__ixor__()

Return self^=value.

Usage

__ixor__(value)

__le__()

Return self<=value.

Usage

__le__(value)

__len__()

Return len(self).

Usage

__len__()

__lt__()

Return self<value.

Usage

__lt__(value)

__matmul__()

Return binary dot product, i.e., intersection count.

Usage

__matmul__()

__ne__()

Return self!=value.

Usage

__ne__(value)

__new__()

Create and return a new object. See help(type) for accurate signature.

Usage

__new__(*args, **kwargs)

__rand__()

Return value&self.

Usage

__rand__(value)

__repr__()

Return repr(self).

Usage

__repr__()

__rmatmul__()

Return value@self.

Usage

__rmatmul__(value)

__ror__()

Return value|self.

Usage

__ror__(value)

__rsub__()

Return value-self.

Usage

__rsub__(value)

__rxor__()

Return value^self.

Usage

__rxor__(value)

add()

Add an index key.

Usage

add(key)

clear()

Remove all indices.

Usage

clear()

difference()

Return the difference of sets as a new set.

Usage

difference(*others)

discard()

Remove an index key, if present.

Usage

discard(key)

dot()

Return the intersection count of sets.

Usage

dot(*others)

fromdense()

Return indices from a dense array representation.

Usage

fromdense(values)

intersection()

Return the intersection of sets as a new set.

Usage

intersection(*others)

isdisjoint()

Return whether two indices have a null intersection.

Usage

isdisjoint(other)

todense()

Return a dense array representation of indices.

Usage

todense(minlength=0, dtype=bool)

union()

Return the union of sets as a new set.

Usage

union(*others)

update()

Update from indices, arrays, or iterables.

Usage

update(*others)