Skip to content

Commit

Permalink
rm rvlib
Browse files Browse the repository at this point in the history
  • Loading branch information
knaaptime committed Aug 23, 2023
1 parent 1ddb9fa commit a759cfc
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion .ci/310.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ dependencies:
- seaborn
- tqdm
- urbanaccess
- rvlib
- numba
- pyproj >=3

Expand Down
3 changes: 1 addition & 2 deletions .ci/38.yml → .ci/311.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: test
channels:
- conda-forge
dependencies:
- python=3.8
- python=3.11
- deprecation
- geopandas>=0.9
- joblib
Expand All @@ -19,7 +19,6 @@ dependencies:
- seaborn
- tqdm
- urbanaccess
- rvlib
- numba
- pyproj >=3

Expand Down
1 change: 0 additions & 1 deletion .ci/39.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ dependencies:
- pytest-mpl
- pytest-cov
- twine
- rvlib

# docs
- ipywidgets
Expand Down
9 changes: 1 addition & 8 deletions segregation/singlegroup/density_corrected_dissim.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,14 @@
import numpy as np
import pandas as pd
from scipy.optimize import minimize
from warnings import warn
from scipy.stats import norm

from .._base import SingleGroupIndex, SpatialImplicitIndex


# Constructing function that returns $n(\hat{\theta}_j)$
def _return_optimal_theta(theta_j):
def fold_norm(x):
try:
from rvlib import Normal
norm = Normal(0, 1)

except ImportError:
warn("Unable to import `rvlib`. Falling back to slower scipy sampler")
from scipy.stats import norm

y = (-1) * (norm.pdf(x - theta_j) + norm.pdf(x + theta_j))
return y
Expand Down

0 comments on commit a759cfc

Please sign in to comment.