Skip to content

Commit

Permalink
use bottleneck for speed up of nanmean
Browse files Browse the repository at this point in the history
  • Loading branch information
N720720 committed Jan 21, 2022
1 parent da378eb commit 1932edd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lindemann/index/per_trj.py
@@ -1,5 +1,6 @@
from typing import Any

import bottleneck as bn
import numba as nb
import numpy as np
import numpy.typing as npt
Expand Down Expand Up @@ -61,4 +62,4 @@ def calculate(frames: npt.NDArray[np.float64]) -> float:
I cant implemnet this in the jit function for now.
"""

return np.mean(np.nanmean(lindemann_per_atom(frames), axis=1)) # type: ignore[no-any-return, no-untyped-call]
return np.mean(bn.nanmean(lindemann_per_atom(frames), axis=1)) # type: ignore[no-any-return, no-untyped-call]

0 comments on commit 1932edd

Please sign in to comment.