vice.migration.migration_matrix.tonumpyarray ============================================ Obtain a copy of this migration matrix as a `NumPy`__ array. **Signature**: x.tonumpyarray() Parameters ---------- x : ``migration_matrix`` An instance of this class. Returns ------- copy : numpy.ndarray A `NumPy`__ array which stores the same values as ``x``. Raises ------ * ModuleNotFoundError [ImportError for python < 3.6] - `NumPy`__ could not be imported. Example Code ------------ >>> import vice >>> example = vice.migration.migration_matrix(3) >>> example.tonumpyarray() array([[0, 0, 0], [0, 0, 0], [0, 0, 0]]) __ numpy_ __ numpy_ __ numpy_ .. _numpy: https://numpy.org