You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The factorial2 function in SciPy returns different values for negative inputs depending on the version. For versions older than 1.11.0, it returns 1, while for versions 1.11.0 and newer, it returns 0.
Code that utilizes the factorial2 function may encounter potential issues, such as those found in the contractions.py file:
@propertydefnorm_prim_cart(self):
r"""Return the normalization constants of the Cartesian Gaussian primitives. For a Cartesian primitive with exponent :math:`\alpha_i`, the normalization constant is: .. math:: N(\alpha_i, \vec{a}) = \sqrt { \left(\frac{2\alpha_i}{\pi}\right)^\frac{3}{2} \frac{(4\alpha_i)^{a_x + a_y + a_z}}{(2a_x - 1)!! (2a_y - 1)!! (2a_z - 1)!!}} Returns ------- norm_prim_cart : np.ndarray(L, K) The normalization constants of the Cartesian Gaussian primitives. `L` is the number of contracted Cartesian Gaussian functions for the given angular momentum, i.e. :math:`(\ell + 1) * (\ell + 2) / 2` `K` is the number of exponents (i.e. primitives). """exponents=self.exps[np.newaxis, :]
angmom_components_cart=self.angmom_components_cart[:, :, np.newaxis]
return (
(2*exponents/np.pi) ** (3/4)
* ((4*exponents) ** (self.angmom/2))
/np.sqrt(np.prod(factorial2(2*angmom_components_cart-1), axis=1))
)
An unwanted value will be returned when angmom_components_cart is 0, i.e., $s$ orbitals.
To Reproduce
Use SciPy with version $\geq 1.11.0$
The text was updated successfully, but these errors were encountered:
Describe the bug
The
factorial2
function inSciPy
returns different values for negative inputs depending on the version. For versions older than1.11.0
, it returns 1, while for versions1.11.0
and newer, it returns 0.Code that utilizes the
factorial2
function may encounter potential issues, such as those found in thecontractions.py
file:An unwanted value will be returned when$s$ orbitals.
angmom_components_cart
is 0, i.e.,To Reproduce$\geq 1.11.0$
Use
SciPy
with versionThe text was updated successfully, but these errors were encountered: