Skip to content

Commit

Permalink
Add numpy doc links
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliottKasoar committed Feb 16, 2024
1 parent 399340b commit 533fe75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"numpy": ("https://numpy.org/doc/stable/", None),
"ase": ("https://wiki.fysik.dtu.dk/ase", None),
}

Expand Down
10 changes: 5 additions & 5 deletions janus_core/single_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pathlib

from ase.io import read
from numpy.typing import NDArray
from numpy import ndarray

from janus_core.mlip_calculators import choose_calculator

Expand Down Expand Up @@ -92,12 +92,12 @@ def _get_potential_energy(self) -> float | list[float]:

return self.sys.get_potential_energy()

def _get_forces(self) -> NDArray | list[NDArray]:
def _get_forces(self) -> ndarray | list[ndarray]:
"""Calculate forces using MLIP.
Returns
-------
forces : NDArray | list[NDArray]
forces : ndarray | list[ndarray]
Forces of system(s).
"""
if isinstance(self.sys, list):
Expand All @@ -108,12 +108,12 @@ def _get_forces(self) -> NDArray | list[NDArray]:

return self.sys.get_forces()

def _get_stress(self) -> NDArray | list[NDArray]:
def _get_stress(self) -> ndarray | list[ndarray]:
"""Calculate stress using MLIP.
Returns
-------
stress : NDArray | list[NDArray]
stress : ndarray | list[ndarray]
Stress of system(s).
"""
if isinstance(self.sys, list):
Expand Down

0 comments on commit 533fe75

Please sign in to comment.