Utils
| import_(module) |
Import a module, and issue a nice message to stderr if the module isn’t installed. |
| ensure_type(val, dtype, ndim, name[, ...]) |
Typecheck the size, shape and dtype of a numpy array, with optional casting. |
| ilen(iterable) |
Length of an iterator. |
| timing([name]) |
A timing context manager |
| lengths_and_angles_to_box_vectors(a_length, ...) |
Convert from the lengths/angles of the unit cell to the box vectors (Bravais vectors). |
| box_vectors_to_lengths_and_angles(a, b, c) |
Convert box vectors into the lengths and angles definining the box |