Skip to content

Commit

Permalink
Update docstring example in array_to_matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor H. Chavez committed Jan 27, 2021
1 parent a52a764 commit 2514ad8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions psi4/driver/p4util/numpy_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ def array_to_matrix(self, arr, name="New Matrix", dim1=None, dim2=None):
Examples
--------
>>> data = np.random.rand(20)
>>> vector = array_to_matrix(data)
>>> data = np.random.rand(20,1)
>>> vector = psi4.core.Matrix.from_array(data)
>>> irrep_data = [np.random.rand(2, 2), np.empty(shape=(0,3)), np.random.rand(4, 4)]
>>> matrix = array_to_matrix(irrep_data)
>>> print matrix.rowspi().to_tuple()
>>> matrix = psi4.core.Matrix.from_array(irrep_data)
>>> print(matrix.rowdim().to_tuple())
(2, 0, 4)
"""

Expand Down

0 comments on commit 2514ad8

Please sign in to comment.