NullShape

class sisl.shape.NullShape(*args, **kwargs)

Bases: sisl.shape.PureShape

A unique shape which has no well-defined spatial volume or center

This special shape is used when composite shapes turns out to have a null space.

The center will be equivalent to the maximum floating point value divided by 100.

Initialization of the NullShape takes no (or any) arguments. Since it has no volume of point in space, none of the arguments has any meaning.

Attributes

__doc__

__module__

__slots__

_center

center

The geometric center of the shape

Methods

__add__(other)

__and__(other)

__contains__(other)

Checks whether all of other is within the shape

__delattr__

Implement delattr(self, name).

__dir__

Default dir() implementation.

__eq__

Return self==value.

__format__

Default object formatter.

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init__(*args, **kwargs)

Initialize a null-shape

__init_subclass__

This method is called when a class is subclassed.

__le__

Return self<=value.

__lt__

Return self<value.

__ne__

Return self!=value.

__new__

Create and return a new object.

__or__(other)

__reduce__

Helper for pickle.

__reduce_ex__

Helper for pickle.

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__

Size of object in memory, in bytes.

__str__()

Return str(self).

__sub__(other)

__subclasshook__

Abstract classes can override this to customize issubclass().

__xor__(other)

expand(c)

Expand the shape by a constant value

scale(scale)

Return a new Shape with a scaled size

toCuboid()

Return a cuboid with side-lengths 1e-64

toEllipsoid()

Return an ellipsoid with radius of size 1e-64

toSphere()

Return a sphere with radius of size 1e-64

volume(*args, **kwargs)

The volume of a null shape is exactly 0.

within(other, *args, **kwargs)

Return True if other is fully within self

within_index(other, *args, **kwargs)

Always returns a zero length array

property center

The geometric center of the shape

expand(c)

Expand the shape by a constant value

scale(scale)

Return a new Shape with a scaled size

toCuboid()[source]

Return a cuboid with side-lengths 1e-64

toEllipsoid()[source]

Return an ellipsoid with radius of size 1e-64

toSphere()[source]

Return a sphere with radius of size 1e-64

volume(*args, **kwargs)[source]

The volume of a null shape is exactly 0.

within(other, *args, **kwargs)

Return True if other is fully within self

If other is an array, an array will be returned for each of these.

Parameters
  • other (array_like) – the array/object that is checked for containment

  • *args – passed directly to within_index

  • **kwargs – passed directly to within_index

within_index(other, *args, **kwargs)[source]

Always returns a zero length array