Skip to content

Commit

Permalink
Add @jit to apply_finite_strain_fitting
Browse files Browse the repository at this point in the history
originally does not exist
  • Loading branch information
singularitti committed Dec 20, 2023
1 parent 1ddc4c9 commit 70572c7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/qha/fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from typing import Optional

import numpy as np
from numpy.linalg import inv
from numba import float64, int64, jit
from qha.type_aliases import Matrix, Vector

# ===================== What can be exported? =====================
Expand Down Expand Up @@ -38,6 +38,11 @@ def polynomial_least_square_fitting(xs, ys, new_xs, order: Optional[int] = 3):
return a, new_y


@jit(
float64[:, :](float64[:], float64[:, :], float64[:], int64),
nopython=True,
cache=True,
)
def apply_finite_strain_fitting(
strains_sparse: Vector,
free_energies: Matrix,
Expand Down

0 comments on commit 70572c7

Please sign in to comment.