utils

class isicle.utils.TypedList(oktypes, *args)[source]

Mutable sequence that requires all members be of select type(s).

oktypes

Object types allowed list membership.

Type:

type or list of types

list

Internal list representation.

Type:

list

_abc_impl = <_abc._abc_data object>
check(v)[source]

Check if supplied value is of allowed type(s).

Raises:

TypeError – If value is not of allowed type(s).

insert(i, v)[source]

S.insert(index, value) – insert value before index

isicle.utils.atomic_masses()[source]
isicle.utils.gettempdir()[source]

Return the name of the directory used for temporary files.

Returns:

Path to temporary directory.

Return type:

str

isicle.utils.mkdtemp(prefix=None, suffix=None)[source]

An ISiCLE-specific wrapper of mkdtemp() to create a temporary directory for temporary ISiCLE files. The temporary directory is not automatically removed.

Parameters:
  • prefix (str) – If not None, temporary directory will start with prefix.

  • suffix (str) – If not None, temporary directory will end with suffix.

Returns:

Path to temporary directory.

Return type:

str

isicle.utils.rmdtemp()[source]

Removes all temporary directories and files created by ISiCLE.

isicle.utils.safelist(x)[source]

Ensures passed object is of correct format.

Parameters:

x (any) – Object to be cast as list.

Returns:

Input safely cast to list-like.

Return type:

list, Series, or ndarray

isicle.utils.tinker_lookup()[source]