Skip to content

The function "mvndst" doesn't exist anymore in scipy.stats. #7

Open

Description

@marcovth

Hello ...

Unfortunately, the function "mvndst" doesn't exist anymore in scipy.stats.
It seems, scipy relied on a Fortran module, and they had to remove it.

Do you think you could help me to find a replacement?

Thanks a lot.

# Cumulative Bivariate Normal Distribution
# Primarily called by Psi() function, part of the _Bjerksund_Stensland_2002 model
def _cbnd(a, b, rho):
    # This distribution uses the Genz multi-variate normal distribution 
    # code found as part of the standard SciPy distribution
    lower = np.array([0, 0])
    upper = np.array([a, b])
    infin = np.array([0, 0])
    correl = rho
    error, value, inform = mvn.mvndst(lower, upper, infin, correl)
    return value

Activity

  1. dedwards25 commented on May 12, 2025

    @dedwards25
    Owner
  2. marcovth commented on May 12, 2025

    @marcovth
    Author

    I found the solution already ...

    import scipy.stats
    
    # Cumulative Bivariate Normal Distribution
    def cbnd(a, b, rho):
        lower = np.array([0, 0])
        upper = np.array([a, b])
        infin = np.array([0, 0])
        correl = rho
        error, value, inform = scipy.stats._mvn.mvndst(lower, upper, infin, correl)
        return value
    
    
  3. dedwards25 commented on May 13, 2025

    @dedwards25
    Owner

    I have created a python version of the FORTRAN function previously embedded in the mvn library. The new code is in the file name "2025".

  4. marcovth commented on May 13, 2025

    @marcovth
    Author

    Thank you very much. I will generate some curves tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions