pysal / segregation

Segregation Measurement, Inferential Statistics, and Decomposition Analysis
https://pysal.org/segregation/
BSD 3-Clause "New" or "Revised" License
112 stars 26 forks source link

tests not passing locally? #176

Closed jGaboardi closed 3 years ago

jGaboardi commented 3 years ago

I am trying to set up a development environment for segregation and can't seem to get tests passing locally (macOS/Python3.9), even though they are clearly passing on remote upstream and remote origin. I have not changed anything from the current master branch. Not sure what is going on here or if I am missing something very obvious. Below is my conda list and testing traceback (obnoxiously long).

environment (created from .ci/39.yml)
``` # # Name Version Build Channel alabaster 0.7.12 py_0 conda-forge appdirs 1.4.4 pyh9f0ad1d_0 conda-forge async_generator 1.10 py_0 conda-forge attrs 21.2.0 pyhd8ed1ab_0 conda-forge aws-requests-auth 0.4.2 py_0 conda-forge babel 2.9.1 pyh44b312d_0 conda-forge beautifulsoup4 4.9.3 pyhb0f4dca_0 conda-forge bleach 3.3.0 pyh44b312d_0 conda-forge blosc 1.21.0 he49afe7_0 conda-forge boost-cpp 1.74.0 hff03dee_4 conda-forge boto3 1.17.106 pyhd8ed1ab_0 conda-forge botocore 1.20.106 pyhd8ed1ab_0 conda-forge brotlipy 0.7.0 py39h89e85a6_1001 conda-forge bs4 4.9.3 0 conda-forge bzip2 1.0.8 h0d85af4_4 conda-forge c-ares 1.17.1 h0d85af4_1 conda-forge ca-certificates 2021.5.30 h033912b_0 conda-forge cairo 1.16.0 he43a7df_1008 conda-forge certifi 2021.5.30 py39h6e9494a_0 conda-forge cffi 1.14.5 py39hb71fe58_0 conda-forge cfitsio 3.470 h01dc385_7 conda-forge chardet 4.0.0 py39h6e9494a_1 conda-forge click 7.1.2 pyh9f0ad1d_0 conda-forge click-plugins 1.1.1 py_0 conda-forge cligj 0.7.2 pyhd8ed1ab_0 conda-forge cmarkgfm 0.6.0 py39h89e85a6_0 conda-forge colorama 0.4.4 pyh9f0ad1d_0 conda-forge coverage 5.5 py39h89e85a6_0 conda-forge coveralls 3.1.0 pyhd8ed1ab_0 conda-forge cryptography 3.4.7 py39ha2c9959_0 conda-forge curl 7.77.0 hb861fe1_0 conda-forge cycler 0.10.0 py_2 conda-forge dataclasses 0.8 pyhc8e2a94_1 conda-forge decorator 5.0.9 pyhd8ed1ab_0 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge deprecation 2.1.0 pyh9f0ad1d_0 conda-forge descartes 1.1.0 py_4 conda-forge dnspython 2.1.0 pyhd8ed1ab_0 conda-forge docopt 0.6.2 py_1 conda-forge docutils 0.17.1 py39h6e9494a_0 conda-forge entrypoints 0.3 pyhd8ed1ab_1003 conda-forge expat 2.4.1 he49afe7_0 conda-forge fiona 1.8.20 py39h10412eb_1 conda-forge flask 2.0.1 pyhd8ed1ab_0 conda-forge flask_cors 3.0.10 pyhd3deb0d_0 conda-forge flask_json 0.3.4 py_0 conda-forge fontconfig 2.13.1 h10f422b_1005 conda-forge freetype 2.10.4 h4cff582_1 conda-forge freexl 1.0.6 h0d85af4_0 conda-forge gdal 3.3.1 py39h0530131_0 conda-forge geographiclib 1.52 pyhd8ed1ab_0 conda-forge geopandas 0.9.0 pyhd8ed1ab_1 conda-forge geopandas-base 0.9.0 pyhd8ed1ab_1 conda-forge geopy 2.1.0 pyhd3deb0d_0 conda-forge geos 3.9.1 he49afe7_2 conda-forge geotiff 1.6.0 h26421ea_6 conda-forge gettext 0.19.8.1 h7937167_1005 conda-forge giflib 5.2.1 hbcb3906_2 conda-forge hdf4 4.2.15 hefd3b78_3 conda-forge hdf5 1.10.6 nompi_hc5d9132_1114 conda-forge icu 68.1 h74dc148_0 conda-forge idna 2.10 pyh9f0ad1d_0 conda-forge imagesize 1.2.0 py_0 conda-forge importlib-metadata 4.6.1 py39h6e9494a_0 conda-forge importlib_metadata 4.6.1 hd8ed1ab_0 conda-forge iniconfig 1.1.1 pyh9f0ad1d_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge itsdangerous 2.0.1 pyhd8ed1ab_0 conda-forge jbig 2.1 h0d85af4_2003 conda-forge jinja2 3.0.1 pyhd8ed1ab_0 conda-forge jmespath 0.10.0 pyh9f0ad1d_0 conda-forge joblib 1.0.1 pyhd8ed1ab_0 conda-forge jpeg 9d hbcb3906_0 conda-forge json-c 0.15 hcb556a6_0 conda-forge jsonlines 1.2.0 pyh9f0ad1d_2 conda-forge jsonschema 3.2.0 pyhd8ed1ab_3 conda-forge jupyter_client 6.1.12 pyhd8ed1ab_0 conda-forge jupyter_core 4.7.1 py39h6e9494a_0 conda-forge jupyterlab_pygments 0.1.2 pyh9f0ad1d_0 conda-forge kealib 1.4.14 h31dd65d_2 conda-forge keyring 23.0.1 py39h6e9494a_0 conda-forge kiwisolver 1.3.1 py39hf018cea_1 conda-forge krb5 1.19.1 hcfbf3a7_0 conda-forge latexcodec 2.0.1 pyh9f0ad1d_0 conda-forge lcms2 2.12 h577c468_0 conda-forge lerc 2.2.1 h046ec9c_0 conda-forge libblas 3.9.0 9_openblas conda-forge libcblas 3.9.0 9_openblas conda-forge libcurl 7.77.0 hf45b732_0 conda-forge libcxx 11.1.0 habf9029_0 conda-forge libdap4 3.20.6 h3e144a0_2 conda-forge libdeflate 1.7 h35c211d_5 conda-forge libedit 3.1.20191231 h0678c8f_2 conda-forge libev 4.33 haf1e3a3_1 conda-forge libffi 3.3 h046ec9c_2 conda-forge libgdal 3.3.1 hd51e85c_0 conda-forge libgfortran 5.0.0 9_3_0_h6c81a4c_22 conda-forge libgfortran5 9.3.0 h6c81a4c_22 conda-forge libglib 2.68.3 hd556434_0 conda-forge libiconv 1.16 haf1e3a3_0 conda-forge libkml 1.3.0 h8fd9edb_1013 conda-forge liblapack 3.9.0 9_openblas conda-forge libnetcdf 4.8.0 nompi_hb4d10b0_103 conda-forge libnghttp2 1.43.0 h07e645a_0 conda-forge libopenblas 0.3.15 openmp_h5e1b9a4_1 conda-forge libpng 1.6.37 h7cec526_2 conda-forge libpq 13.3 hea3049e_0 conda-forge libpysal 4.5.1 pyhd8ed1ab_0 conda-forge librttopo 1.1.0 h5413771_6 conda-forge libsodium 1.0.18 hbcb3906_1 conda-forge libspatialindex 1.9.3 h1c7c35f_3 conda-forge libspatialite 5.0.1 h035f608_5 conda-forge libssh2 1.9.0 h52ee1ee_6 conda-forge libtiff 4.3.0 h1167814_1 conda-forge libwebp-base 1.2.0 h0d85af4_2 conda-forge libxml2 2.9.12 h93ec3fd_0 conda-forge libzip 1.8.0 h8b0c345_0 conda-forge llvm-openmp 11.1.0 hda6cdc1_1 conda-forge lz4-c 1.9.3 h046ec9c_0 conda-forge mapclassify 2.4.2 pyhd8ed1ab_0 conda-forge markupsafe 2.0.1 py39h89e85a6_0 conda-forge matplotlib 3.4.2 py39h6e9494a_0 conda-forge matplotlib-base 3.4.2 py39hb07454d_0 conda-forge mistune 0.8.4 py39h89e85a6_1004 conda-forge mock 4.0.3 py39h6e9494a_1 conda-forge more-itertools 8.8.0 pyhd8ed1ab_0 conda-forge munch 2.5.0 py_0 conda-forge nbclient 0.5.3 pyhd8ed1ab_0 conda-forge nbconvert 6.1.0 py39h6e9494a_0 conda-forge nbformat 5.1.3 pyhd8ed1ab_0 conda-forge nbsphinx 0.8.6 pyhd8ed1ab_1 conda-forge ncurses 6.2 h2e338ed_4 conda-forge nest-asyncio 1.5.1 pyhd8ed1ab_0 conda-forge networkx 2.5 py_0 conda-forge numexpr 2.7.3 py39h4d6be9b_0 conda-forge numpy 1.21.0 py39h7eed0ac_0 conda-forge numpydoc 1.1.0 py_1 conda-forge olefile 0.46 pyh9f0ad1d_1 conda-forge openjpeg 2.4.0 h6e7aa92_1 conda-forge openssl 1.1.1k h0d85af4_0 conda-forge oset 0.1.3 py_1 conda-forge osmnet 0.1.6 py_0 conda-forge packaging 21.0 pyhd8ed1ab_0 conda-forge pandana 0.6.1 py39h4d6be9b_0 conda-forge pandas 1.3.0 py39h4d6be9b_0 conda-forge pandoc 2.14.0.3 h0d85af4_0 conda-forge pandocfilters 1.4.2 py_1 conda-forge patsy 0.5.1 py_0 conda-forge pcre 8.45 he49afe7_0 conda-forge pillow 8.3.0 py39he9bb72f_0 conda-forge pip 21.1.3 pyhd8ed1ab_0 conda-forge pixman 0.40.0 hbcb3906_0 conda-forge pkginfo 1.7.0 pyhd8ed1ab_0 conda-forge pluggy 0.13.1 py39h6e9494a_4 conda-forge pockets 0.9.1 py_0 conda-forge poppler 21.03.0 h640f9a4_0 conda-forge poppler-data 0.4.10 0 conda-forge postgresql 13.3 he8fe76e_0 conda-forge proj 8.0.1 h1512c50_0 conda-forge py 1.10.0 pyhd3deb0d_0 conda-forge pybtex 0.24.0 py39h6e9494a_0 conda-forge pybtex-docutils 1.0.0 py39h6e9494a_0 conda-forge pycparser 2.20 pyh9f0ad1d_2 conda-forge pygeos 0.10 py39h1d9c377_0 conda-forge pygments 2.9.0 pyhd8ed1ab_0 conda-forge pyopenssl 20.0.1 pyhd8ed1ab_0 conda-forge pyparsing 2.4.7 pyh9f0ad1d_0 conda-forge pyproj 3.1.0 py39h7b8b08e_3 conda-forge pyrsistent 0.17.3 py39h89e85a6_2 conda-forge pysocks 1.7.1 py39h6e9494a_3 conda-forge pytables 3.6.1 py39hd07922a_3 conda-forge pytest 6.2.4 py39h6e9494a_0 conda-forge pytest-cov 2.12.1 pyhd8ed1ab_0 conda-forge pytest-mpl 0.13 pyhd8ed1ab_0 conda-forge python 3.9.6 hd187cdc_0_cpython conda-forge python-dateutil 2.8.1 py_0 conda-forge python_abi 3.9 2_cp39 conda-forge pytz 2021.1 pyhd8ed1ab_0 conda-forge pyyaml 5.4.1 py39hcbf5805_0 conda-forge pyzmq 22.1.0 py39h7fec2f1_0 conda-forge quilt3 3.4.0 pyhd8ed1ab_0 conda-forge readline 8.1 h05e3726_0 conda-forge readme_renderer 27.0 pyh9f0ad1d_0 conda-forge requests 2.25.1 pyhd3deb0d_0 conda-forge requests-futures 1.0.0 pyh9f0ad1d_2 conda-forge requests-toolbelt 0.9.1 py_0 conda-forge rfc3986 1.5.0 pyhd8ed1ab_0 conda-forge rtree 0.9.7 py39h7d0d40a_1 conda-forge s3transfer 0.4.2 pyhd8ed1ab_0 conda-forge scikit-learn 0.24.2 py39h4b1dcc9_0 conda-forge scipy 1.7.0 py39h056f1c0_0 conda-forge seaborn 0.11.1 hd8ed1ab_1 conda-forge seaborn-base 0.11.1 pyhd8ed1ab_1 conda-forge setuptools 49.6.0 py39h6e9494a_3 conda-forge shapely 1.7.1 py39h1d9c377_5 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge snowballstemmer 2.1.0 pyhd8ed1ab_0 conda-forge soupsieve 2.0.1 py_1 conda-forge sphinx 4.0.3 pyh6c4a22f_0 conda-forge sphinx-gallery 0.9.0 pyhd8ed1ab_0 conda-forge sphinx_bootstrap_theme 0.8.0 py_0 conda-forge sphinxcontrib-applehelp 1.0.2 py_0 conda-forge sphinxcontrib-bibtex 1.0.0 py_0 conda-forge sphinxcontrib-devhelp 1.0.2 py_0 conda-forge sphinxcontrib-htmlhelp 2.0.0 pyhd8ed1ab_0 conda-forge sphinxcontrib-jsmath 1.0.1 py_0 conda-forge sphinxcontrib-napoleon 0.7 py_0 conda-forge sphinxcontrib-qthelp 1.0.3 py_0 conda-forge sphinxcontrib-serializinghtml 1.1.5 pyhd8ed1ab_0 conda-forge sqlite 3.36.0 h23a322b_0 conda-forge statsmodels 0.12.2 py39h329c335_0 conda-forge tenacity 7.0.0 pyhd8ed1ab_0 conda-forge testpath 0.5.0 pyhd8ed1ab_0 conda-forge threadpoolctl 2.1.0 pyh5ca1d4c_0 conda-forge tiledb 2.3.1 h8370e7a_0 conda-forge tk 8.6.10 h0419947_1 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tornado 6.1 py39h89e85a6_1 conda-forge tqdm 4.61.2 pyhd8ed1ab_1 conda-forge traitlets 5.0.5 py_0 conda-forge twine 3.4.1 pyhd8ed1ab_0 conda-forge tzcode 2021a h0d85af4_1 conda-forge tzdata 2021a he74cb21_0 conda-forge urbanaccess 0.2.2 pyhd3deb0d_0 conda-forge urllib3 1.26.6 pyhd8ed1ab_0 conda-forge webencodings 0.5.1 py_1 conda-forge werkzeug 2.0.1 pyhd8ed1ab_0 conda-forge wheel 0.36.2 pyhd3deb0d_0 conda-forge xerces-c 3.2.3 h379762d_2 conda-forge xz 5.2.5 haf1e3a3_1 conda-forge yaml 0.2.5 haf1e3a3_0 conda-forge zeromq 4.3.4 h1c7c35f_0 conda-forge zipp 3.5.0 pyhd8ed1ab_0 conda-forge zlib 1.2.11 h7795811_1010 conda-forge zstd 1.5.0 h582d3a0_0 conda-forge ```
testing traceback
``` python ============================================================================== test session starts ============================================================================== platform darwin -- Python 3.9.6, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /miniconda3/envs/ci39_segregation/bin/python cachedir: .pytest_cache Matplotlib: 3.4.2 Freetype: 2.10.4 rootdir: /segregation plugins: cov-2.12.1, mpl-0.13 collected 53 items segregation/tests/test_absolute_centralization.py::Absolute_Centralization_Tester::test_Absolute_Centralization FAILED [ 1%] segregation/tests/test_absolute_clustering.py::Absolute_Clustering_Tester::test_Absolute_Clustering FAILED [ 3%] segregation/tests/test_absolute_concentration.py::Absolute_Concentration_Tester::test_Absolute_Concentration FAILED [ 5%] segregation/tests/test_atkinson.py::Atkinson_Tester::test_Atkinson FAILED [ 7%] segregation/tests/test_batch_compute.py::test_batch_single FAILED [ 9%] segregation/tests/test_batch_compute.py::test_batch_multi FAILED [ 11%] segregation/tests/test_batch_compute.py::test_batch_multiscalar_multi FAILED [ 13%] segregation/tests/test_batch_compute.py::test_batch_multiscalar_single FAILED [ 15%] segregation/tests/test_bias_corrected_dissimilarity.py::Bias_Corrected_Dissim_Tester::test_Bias_Corrected_Dissim FAILED [ 16%] segregation/tests/test_boundary_spatial_dissimilarity.py::Boundary_Spatial_Dissim_Tester::test_Boundary_Spatial_Dissim FAILED [ 18%] segregation/tests/test_conprof.py::Con_Prof_Tester::test_Con_Prof FAILED [ 20%] segregation/tests/test_correlationr.py::Correlation_R_Tester::test_Correlation_R FAILED [ 22%] segregation/tests/test_decomposition.py::Decomposition_Tester::test_Decomposition FAILED [ 24%] segregation/tests/test_delta.py::Delta_Tester::test_Delta FAILED [ 26%] segregation/tests/test_density_corrected_dissimilarity.py::Density_Corrected_Dissim_Tester::test_Density_Corrected_Dissim FAILED [ 28%] segregation/tests/test_dissim.py::Dissim_Tester::test_Dissim FAILED [ 30%] segregation/tests/test_distance_decay_interaction.py::Distance_Decay_Interaction_Tester::test_Distance_Decay_Interaction FAILED [ 32%] segregation/tests/test_distance_decay_isolation.py::Distance_Decay_Isolation_Tester::test_Distance_Decay_Isolation FAILED [ 33%] segregation/tests/test_entropy.py::Entropy_Tester::test_Entropy FAILED [ 35%] segregation/tests/test_gini_seg.py::Gini_Seg_Tester::test_Gini_Seg FAILED [ 37%] segregation/tests/test_inference.py::Inference_Tester::test_Inference FAILED [ 39%] segregation/tests/test_interaction.py::Interaction_Tester::test_Interaction FAILED [ 41%] segregation/tests/test_isolation.py::Isolation_Tester::test_Isolation FAILED [ 43%] segregation/tests/test_local_multi_local_diversity.py::Multi_Local_Diversity_Tester::test_Multi_Local_Diversity FAILED [ 45%] segregation/tests/test_local_multi_local_entropy.py::Multi_Local_Entropy_Tester::test_Multi_Local_Entropy FAILED [ 47%] segregation/tests/test_local_multi_local_simpson_concentration.py::Multi_Local_Simpson_Concentration_Tester::test_Multi_Local_Simpson_Concentration FAILED [ 49%] segregation/tests/test_local_multi_local_simpson_interaction.py::Multi_Local_Simpson_Interaction_Tester::test_Multi_Local_Simpson_Interaction FAILED [ 50%] segregation/tests/test_local_multi_location_quotient.py::Multi_Location_Quotient_Tester::test_Multi_Location_Quotient FAILED [ 52%] segregation/tests/test_local_relative_centralization.py::Local_Relative_Centralization_Tester::test_Local_Relative_Centralization FAILED [ 54%] segregation/tests/test_min_max_s.py::SpatialMinMax_Tester::test_SpatialMinMax FAILED [ 56%] segregation/tests/test_modified_dissimilarity.py::Modified_Dissim_Tester::test_Modified_Dissim FAILED [ 58%] segregation/tests/test_modified_gini.py::Modified_Gini_Seg_Tester::test_Modified_Gini FAILED [ 60%] segregation/tests/test_multi_dissim.py::Multi_Dissim_Tester::test_Multi_Dissim FAILED [ 62%] segregation/tests/test_multi_divergence.py::Multi_Divergence_Tester::test_Multi_Divergence FAILED [ 64%] segregation/tests/test_multi_diversity.py::Multi_Diversity_Tester::test_Multi_Diversity FAILED [ 66%] segregation/tests/test_multi_gini_seg.py::Multi_Gini_Seg_Tester::test_Multi_Gini_Seg FAILED [ 67%] segregation/tests/test_multi_information_theory.py::Multi_Information_Theory_Tester::test_Multi_Information_Theory FAILED [ 69%] segregation/tests/test_multi_normalized_exposure.py::Multi_Normalized_Exposure_Tester::test_Multi_Multi_Normalized_Exposure FAILED [ 71%] segregation/tests/test_multi_relative_diversity.py::Multi_Relative_Diversity_Tester::test_Multi_Relative_Diversity FAILED [ 73%] segregation/tests/test_multi_simpsons_concentration.py::Simpsons_Concentration_Tester::test_Simpsons_Concentration FAILED [ 75%] segregation/tests/test_multi_simpsons_interaction.py::Simpsons_Interaction_Tester::test_Simpsons_Interaction FAILED [ 77%] segregation/tests/test_multi_squared_coefficient_of_variation.py::Multi_Squared_Coefficient_of_Variation_Tester::test_Multi_Squared_Coefficient_of_Variation FAILED [ 79%] segregation/tests/test_multiscalar_profile.py::test_multiscalar FAILED [ 81%] segregation/tests/test_multiscalar_profile.py::test_multiscalar_network FAILED [ 83%] segregation/tests/test_network.py::Network_Tester::test_calc_access FAILED [ 84%] segregation/tests/test_network_download.py::test_network_download PASSED [ 86%] segregation/tests/test_perimeter_area_ratio_spatial_dissimilarity.py::Perimeter_Area_Ratio_Spatial_Dissim_Tester::test_Perimeter_Area_Ratio_Spatial_Dissim FAILED [ 88%] segregation/tests/test_relative_centralization.py::Relative_Centralization_Tester::test_Relative_Centralization FAILED [ 90%] segregation/tests/test_relative_clustering.py::Relative_Clustering_Tester::test_Relative_Clustering FAILED [ 92%] segregation/tests/test_relative_concentration.py::Relative_Concentration_Tester::test_Relative_Concentration FAILED [ 94%] segregation/tests/test_spatial_dissimilarity.py::Spatial_Dissim_Tester::test_Spatial_Dissim FAILED [ 96%] segregation/tests/test_spatial_prox_profile.py::Spatial_Prox_Prof_Tester::test_Spatial_Prox_Prof FAILED [ 98%] segregation/tests/test_spatial_proximity.py::Spatial_Proximity_Tester::test_Spatial_Proximity FAILED [100%] =================================================================================== FAILURES ==================================================================================== __________________________________________________________ Absolute_Centralization_Tester.test_Absolute_Centralization __________________________________________________________ self = def test_Absolute_Centralization(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_absolute_centralization.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError ______________________________________________________________ Absolute_Clustering_Tester.test_Absolute_Clustering ______________________________________________________________ self = def test_Absolute_Clustering(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) s_map = s_map.to_crs(s_map.estimate_utm_crs()) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_absolute_clustering.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError ___________________________________________________________ Absolute_Concentration_Tester.test_Absolute_Concentration ___________________________________________________________ self = def test_Absolute_Concentration(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_absolute_concentration.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError _________________________________________________________________________ Atkinson_Tester.test_Atkinson _________________________________________________________________________ self = def test_Atkinson(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_atkinson.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError _______________________________________________________________________________ test_batch_single _______________________________________________________________________________ def test_batch_single(): > fit = batch_compute_singlegroup( s_map.to_crs(s_map.estimate_utm_crs()), group_pop_var="HISP", total_pop_var="TOT_POP", distance=2000, center="mean", function="triangular", ) segregation/tests/test_batch_compute.py:15: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ segregation/batch/batch_compute.py:56: in batch_compute_singlegroup fitted[each] = singlegroup_classes[each]( segregation/singlegroup/absolute_centralization.py:207: in __init__ SingleGroupIndex.__init__(self, data, group_pop_var, total_pop_var) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = data = FIPS MSA TOT_POP POP_16 POP_65 WHITE_ BLACK_ ... HH_INC POV_POP POV_TOT HSG_VAL FIP... 1932 218 99800 6067009800 403 POLYGON ((599784.769 4213752.016, 599769.473 4... [403 rows x 32 columns] group_pop_var = 'HISP', total_pop_var = 'TOT_POP' def __init__( self, data, group_pop_var, total_pop_var, ): """Initialize singlegroup index. Parameters ---------- data : pandas.DataFrame or geopandas.GeoDataFrame dataframe or geodataframe if spatial index holding data for location of interest group_pop_var : str name of column on dataframe holding population totals for focal group total_pop_var : str name of column on dataframe holding total overall population """ data = data.copy() if any([type(group_pop_var) is not str, type(total_pop_var) is not str]): raise TypeError("group_pop_var and total_pop_var must be strings") if any([group_pop_var not in data.columns, total_pop_var not in data.columns]): > raise ValueError( "group_pop_var and total_pop_var columns must be present on the dataframe" ) E ValueError: group_pop_var and total_pop_var columns must be present on the dataframe segregation/_base.py:113: ValueError _______________________________________________________________________________ test_batch_multi ________________________________________________________________________________ def test_batch_multi(): > mfit = batch_compute_multigroup( s_map.to_crs(s_map.estimate_utm_crs()), distance=2000, groups=["HISP", "BLACK", "WHITE"], ) segregation/tests/test_batch_compute.py:59: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ segregation/batch/batch_compute.py:84: in batch_compute_multigroup fitted[each] = multigroup_classes[each](gdf, groups, **kwargs).statistic segregation/multigroup/multi_dissim.py:102: in __init__ SpatialImplicitIndex.__init__(self, w, network, distance, decay, function, precompute) segregation/_base.py:226: in __init__ self.data = _build_local_environment( segregation/_base.py:255: in _build_local_environment for y in data[groups]: ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['HISP', 'BLACK', 'WHITE'], dtype='object'), indexer = array([-1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['HISP', 'BLACK', 'WHITE'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError _________________________________________________________________________ test_batch_multiscalar_multi __________________________________________________________________________ def test_batch_multiscalar_multi(): > mfit = batch_multiscalar_multigroup( s_map.to_crs(s_map.estimate_utm_crs()), distances=[500, 1000], groups=["HISP", "BLACK", "WHITE"], ) segregation/tests/test_batch_compute.py:83: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ segregation/batch/batch_compute.py:155: in batch_multiscalar_multigroup prof = compute_multiscalar_profile( segregation/dynamics/segregation_profile.py:79: in compute_multiscalar_profile gdf[groups] = gdf[groups].astype(float) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['HISP', 'BLACK', 'WHITE'], dtype='object'), indexer = array([-1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['HISP', 'BLACK', 'WHITE'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError _________________________________________________________________________ test_batch_multiscalar_single _________________________________________________________________________ def test_batch_multiscalar_single(): > mfit = batch_multiscalar_singlegroup( s_map.to_crs(s_map.estimate_utm_crs()), distances=[500, 1000], group_pop_var="HISP", total_pop_var="TOT_POP", ) segregation/tests/test_batch_compute.py:92: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ segregation/batch/batch_compute.py:119: in batch_multiscalar_singlegroup prof = compute_multiscalar_profile( segregation/dynamics/segregation_profile.py:82: in compute_multiscalar_profile indices[0] = segregation_index( segregation/singlegroup/atkinson.py:116: in __init__ SingleGroupIndex.__init__(self, data, group_pop_var, total_pop_var) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = data = FIPS MSA TOT_POP POP_16 POP_65 WHITE_ BLACK_ ... HH_INC POV_POP POV_TOT HSG_VAL FIP... 1932 218 99800 6067009800 403 POLYGON ((599784.769 4213752.016, 599769.473 4... [403 rows x 32 columns] group_pop_var = 'HISP', total_pop_var = 'TOT_POP' def __init__( self, data, group_pop_var, total_pop_var, ): """Initialize singlegroup index. Parameters ---------- data : pandas.DataFrame or geopandas.GeoDataFrame dataframe or geodataframe if spatial index holding data for location of interest group_pop_var : str name of column on dataframe holding population totals for focal group total_pop_var : str name of column on dataframe holding total overall population """ data = data.copy() if any([type(group_pop_var) is not str, type(total_pop_var) is not str]): raise TypeError("group_pop_var and total_pop_var must be strings") if any([group_pop_var not in data.columns, total_pop_var not in data.columns]): > raise ValueError( "group_pop_var and total_pop_var columns must be present on the dataframe" ) E ValueError: group_pop_var and total_pop_var columns must be present on the dataframe segregation/_base.py:113: ValueError ____________________________________________________________ Bias_Corrected_Dissim_Tester.test_Bias_Corrected_Dissim ____________________________________________________________ self = def test_Bias_Corrected_Dissim(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_bias_corrected_dissimilarity.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError __________________________________________________________ Boundary_Spatial_Dissim_Tester.test_Boundary_Spatial_Dissim __________________________________________________________ self = def test_Boundary_Spatial_Dissim(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_boundary_spatial_dissimilarity.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError _________________________________________________________________________ Con_Prof_Tester.test_Con_Prof _________________________________________________________________________ self = def test_Con_Prof(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_conprof.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError ____________________________________________________________________ Correlation_R_Tester.test_Correlation_R ____________________________________________________________________ self = def test_Correlation_R(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_correlationr.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError ____________________________________________________________________ Decomposition_Tester.test_Decomposition ____________________________________________________________________ self = def test_Decomposition(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > index1 = Dissim(s_map, 'HISP', 'TOT_POP') segregation/tests/test_decomposition.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ segregation/singlegroup/dissim.py:114: in __init__ SingleGroupIndex.__init__(self, data, group_pop_var, total_pop_var) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = data = FIPS MSA TOT_POP POP_16 POP_65 WHITE_ BLACK_ ... HH_INC POV_POP POV_TOT HSG_VAL FIP... 1932 218 99800 6067009800 403 POLYGON ((-121.86246 38.06603, -121.86262 38.0... [403 rows x 32 columns] group_pop_var = 'HISP', total_pop_var = 'TOT_POP' def __init__( self, data, group_pop_var, total_pop_var, ): """Initialize singlegroup index. Parameters ---------- data : pandas.DataFrame or geopandas.GeoDataFrame dataframe or geodataframe if spatial index holding data for location of interest group_pop_var : str name of column on dataframe holding population totals for focal group total_pop_var : str name of column on dataframe holding total overall population """ data = data.copy() if any([type(group_pop_var) is not str, type(total_pop_var) is not str]): raise TypeError("group_pop_var and total_pop_var must be strings") if any([group_pop_var not in data.columns, total_pop_var not in data.columns]): > raise ValueError( "group_pop_var and total_pop_var columns must be present on the dataframe" ) E ValueError: group_pop_var and total_pop_var columns must be present on the dataframe segregation/_base.py:113: ValueError ____________________________________________________________________________ Delta_Tester.test_Delta ____________________________________________________________________________ self = def test_Delta(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_delta.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError _________________________________________________________ Density_Corrected_Dissim_Tester.test_Density_Corrected_Dissim _________________________________________________________ self = def test_Density_Corrected_Dissim(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_density_corrected_dissimilarity.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError ___________________________________________________________________________ Dissim_Tester.test_Dissim ___________________________________________________________________________ self = def test_Dissim(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_dissim.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError _______________________________________________________ Distance_Decay_Interaction_Tester.test_Distance_Decay_Interaction _______________________________________________________ self = def test_Distance_Decay_Interaction(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_distance_decay_interaction.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError _________________________________________________________ Distance_Decay_Isolation_Tester.test_Distance_Decay_Isolation _________________________________________________________ self = def test_Distance_Decay_Isolation(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_distance_decay_isolation.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError __________________________________________________________________________ Entropy_Tester.test_Entropy __________________________________________________________________________ self = def test_Entropy(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_entropy.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError _________________________________________________________________________ Gini_Seg_Tester.test_Gini_Seg _________________________________________________________________________ self = def test_Gini_Seg(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_gini_seg.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError ________________________________________________________________________ Inference_Tester.test_Inference ________________________________________________________________________ self = def test_Inference(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > index1 = Dissim(s_map, "HISP", "TOT_POP") segregation/tests/test_inference.py:14: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ segregation/singlegroup/dissim.py:114: in __init__ SingleGroupIndex.__init__(self, data, group_pop_var, total_pop_var) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = data = FIPS MSA TOT_POP POP_16 POP_65 WHITE_ BLACK_ ... HH_INC POV_POP POV_TOT HSG_VAL FIP... 1932 218 99800 6067009800 403 POLYGON ((-121.86246 38.06603, -121.86262 38.0... [403 rows x 32 columns] group_pop_var = 'HISP', total_pop_var = 'TOT_POP' def __init__( self, data, group_pop_var, total_pop_var, ): """Initialize singlegroup index. Parameters ---------- data : pandas.DataFrame or geopandas.GeoDataFrame dataframe or geodataframe if spatial index holding data for location of interest group_pop_var : str name of column on dataframe holding population totals for focal group total_pop_var : str name of column on dataframe holding total overall population """ data = data.copy() if any([type(group_pop_var) is not str, type(total_pop_var) is not str]): raise TypeError("group_pop_var and total_pop_var must be strings") if any([group_pop_var not in data.columns, total_pop_var not in data.columns]): > raise ValueError( "group_pop_var and total_pop_var columns must be present on the dataframe" ) E ValueError: group_pop_var and total_pop_var columns must be present on the dataframe segregation/_base.py:113: ValueError ______________________________________________________________________ Interaction_Tester.test_Interaction ______________________________________________________________________ self = def test_Interaction(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_interaction.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError ________________________________________________________________________ Isolation_Tester.test_Isolation ________________________________________________________________________ self = def test_Isolation(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_isolation.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError ____________________________________________________________ Multi_Local_Diversity_Tester.test_Multi_Local_Diversity ____________________________________________________________ self = def test_Multi_Local_Diversity(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) groups_list = ["WHITE", "BLACK", "ASIAN", "HISP"] > df = s_map[groups_list] segregation/tests/test_local_multi_local_diversity.py:13: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object'), indexer = array([-1, -1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError ______________________________________________________________ Multi_Local_Entropy_Tester.test_Multi_Local_Entropy ______________________________________________________________ self = def test_Multi_Local_Entropy(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) groups_list = ['WHITE', 'BLACK', 'ASIAN','HISP'] > df = s_map[groups_list] segregation/tests/test_local_multi_local_entropy.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object'), indexer = array([-1, -1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError ________________________________________________ Multi_Local_Simpson_Concentration_Tester.test_Multi_Local_Simpson_Concentration ________________________________________________ self = def test_Multi_Local_Simpson_Concentration(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) groups_list = ['WHITE', 'BLACK', 'ASIAN','HISP'] > df = s_map[groups_list] segregation/tests/test_local_multi_local_simpson_concentration.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object'), indexer = array([-1, -1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError __________________________________________________ Multi_Local_Simpson_Interaction_Tester.test_Multi_Local_Simpson_Interaction __________________________________________________ self = def test_Multi_Local_Simpson_Interaction(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) groups_list = ['WHITE', 'BLACK', 'ASIAN','HISP'] > df = s_map[groups_list] segregation/tests/test_local_multi_local_simpson_interaction.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object'), indexer = array([-1, -1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError __________________________________________________________ Multi_Location_Quotient_Tester.test_Multi_Location_Quotient __________________________________________________________ self = def test_Multi_Location_Quotient(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) groups_list = ['WHITE', 'BLACK', 'ASIAN','HISP'] > df = s_map[groups_list] segregation/tests/test_local_multi_location_quotient.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object'), indexer = array([-1, -1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError ____________________________________________________ Local_Relative_Centralization_Tester.test_Local_Relative_Centralization ____________________________________________________ self = def test_Local_Relative_Centralization(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[["geometry", "BLACK", "TOT_POP"]] segregation/tests/test_local_relative_centralization.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'BLACK', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['BLACK'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError ____________________________________________________________________ SpatialMinMax_Tester.test_SpatialMinMax ____________________________________________________________________ self = def test_SpatialMinMax(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_min_max_s.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError __________________________________________________________________ Modified_Dissim_Tester.test_Modified_Dissim __________________________________________________________________ self = def test_Modified_Dissim(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_modified_dissimilarity.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError __________________________________________________________________ Modified_Gini_Seg_Tester.test_Modified_Gini __________________________________________________________________ self = def test_Modified_Gini(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_modified_gini.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError _____________________________________________________________________ Multi_Dissim_Tester.test_Multi_Dissim _____________________________________________________________________ self = def test_Multi_Dissim(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) groups_list = ['WHITE', 'BLACK', 'ASIAN','HISP'] > df = s_map[groups_list] segregation/tests/test_multi_dissim.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object'), indexer = array([-1, -1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError _________________________________________________________________ Multi_Divergence_Tester.test_Multi_Divergence _________________________________________________________________ self = def test_Multi_Divergence(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) groups_list = ['WHITE', 'BLACK', 'ASIAN','HISP'] > df = s_map[groups_list] segregation/tests/test_multi_divergence.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object'), indexer = array([-1, -1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError __________________________________________________________________ Multi_Diversity_Tester.test_Multi_Diversity __________________________________________________________________ self = def test_Multi_Diversity(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) groups_list = ['WHITE', 'BLACK', 'ASIAN','HISP'] > df = s_map[groups_list] segregation/tests/test_multi_diversity.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object'), indexer = array([-1, -1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError ___________________________________________________________________ Multi_Gini_Seg_Tester.test_Multi_Gini_Seg ___________________________________________________________________ self = def test_Multi_Gini_Seg(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) groups_list = ['WHITE', 'BLACK', 'ASIAN','HISP'] > df = s_map[groups_list] segregation/tests/test_multi_gini_seg.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object'), indexer = array([-1, -1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError _________________________________________________________ Multi_Information_Theory_Tester.test_Multi_Information_Theory _________________________________________________________ self = def test_Multi_Information_Theory(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) groups_list = ['WHITE', 'BLACK', 'ASIAN','HISP'] > df = s_map[groups_list] segregation/tests/test_multi_information_theory.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object'), indexer = array([-1, -1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError _____________________________________________________ Multi_Normalized_Exposure_Tester.test_Multi_Multi_Normalized_Exposure _____________________________________________________ self = def test_Multi_Multi_Normalized_Exposure(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) groups_list = ['WHITE', 'BLACK', 'ASIAN','HISP'] > df = s_map[groups_list] segregation/tests/test_multi_normalized_exposure.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object'), indexer = array([-1, -1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError _________________________________________________________ Multi_Relative_Diversity_Tester.test_Multi_Relative_Diversity _________________________________________________________ self = def test_Multi_Relative_Diversity(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) groups_list = ['WHITE', 'BLACK', 'ASIAN','HISP'] > df = s_map[groups_list] segregation/tests/test_multi_relative_diversity.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object'), indexer = array([-1, -1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError ___________________________________________________________ Simpsons_Concentration_Tester.test_Simpsons_Concentration ___________________________________________________________ self = def test_Simpsons_Concentration(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) groups_list = ['WHITE', 'BLACK', 'ASIAN','HISP'] > df = s_map[groups_list] segregation/tests/test_multi_simpsons_concentration.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object'), indexer = array([-1, -1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError _____________________________________________________________ Simpsons_Interaction_Tester.test_Simpsons_Interaction _____________________________________________________________ self = def test_Simpsons_Interaction(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) groups_list = ['WHITE', 'BLACK', 'ASIAN','HISP'] > df = s_map[groups_list] segregation/tests/test_multi_simpsons_interaction.py:12: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object'), indexer = array([-1, -1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError ___________________________________________ Multi_Squared_Coefficient_of_Variation_Tester.test_Multi_Squared_Coefficient_of_Variation ___________________________________________ self = def test_Multi_Squared_Coefficient_of_Variation(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) groups_list = ['WHITE', 'BLACK', 'ASIAN','HISP'] > df = s_map[groups_list] segregation/tests/test_multi_squared_coefficient_of_variation.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object'), indexer = array([-1, -1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError _______________________________________________________________________________ test_multiscalar ________________________________________________________________________________ def test_multiscalar(): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) df = s_map.to_crs(s_map.estimate_utm_crs()) > profile = compute_multiscalar_profile( gdf=df, segregation_index=MultiDissim, distances=[500, 1000, 1500, 2000], groups=["HISP", "BLACK", "WHITE"], ) segregation/tests/test_multiscalar_profile.py:17: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ segregation/dynamics/segregation_profile.py:79: in compute_multiscalar_profile gdf[groups] = gdf[groups].astype(float) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['HISP', 'BLACK', 'WHITE'], dtype='object'), indexer = array([-1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['HISP', 'BLACK', 'WHITE'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError ___________________________________________________________________________ test_multiscalar_network ____________________________________________________________________________ def test_multiscalar_network(): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) df = s_map.to_crs(s_map.estimate_utm_crs()) > profile = compute_multiscalar_profile( gdf=df, segregation_index=MultiDissim, distances=[500, 1000], groups=["HISP", "BLACK", "WHITE"], ) segregation/tests/test_multiscalar_profile.py:31: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ segregation/dynamics/segregation_profile.py:79: in compute_multiscalar_profile gdf[groups] = gdf[groups].astype(float) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['HISP', 'BLACK', 'WHITE'], dtype='object'), indexer = array([-1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) > raise KeyError(f"None of [{key}] are in the [{axis_name}]") E KeyError: "None of [Index(['HISP', 'BLACK', 'WHITE'], dtype='object')] are in the [columns]" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1374: KeyError ________________________________________________________________________ Network_Tester.test_calc_access ________________________________________________________________________ self = def test_calc_access(self): variables = ['WHITE', 'BLACK', 'ASIAN', 'HISP'] s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['FIPS', 'geometry'] + variables] segregation/tests/test_network.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['FIPS', 'geometry', 'WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object') indexer = array([ 0, 31, -1, -1, -1, -1]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['WHITE', 'BLACK', 'ASIAN', 'HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError ______________________________________________ Perimeter_Area_Ratio_Spatial_Dissim_Tester.test_Perimeter_Area_Ratio_Spatial_Dissim ______________________________________________ self = def test_Perimeter_Area_Ratio_Spatial_Dissim(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_perimeter_area_ratio_spatial_dissimilarity.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError __________________________________________________________ Relative_Centralization_Tester.test_Relative_Centralization __________________________________________________________ self = def test_Relative_Centralization(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_relative_centralization.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError ______________________________________________________________ Relative_Clustering_Tester.test_Relative_Clustering ______________________________________________________________ self = def test_Relative_Clustering(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_relative_clustering.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError ___________________________________________________________ Relative_Concentration_Tester.test_Relative_Concentration ___________________________________________________________ self = def test_Relative_Concentration(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_relative_concentration.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError ___________________________________________________________________ Spatial_Dissim_Tester.test_Spatial_Dissim ___________________________________________________________________ self = def test_Spatial_Dissim(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_spatial_dissimilarity.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError ________________________________________________________________ Spatial_Prox_Prof_Tester.test_Spatial_Prox_Prof ________________________________________________________________ self = def test_Spatial_Prox_Prof(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_spatial_prox_profile.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError ________________________________________________________________ Spatial_Proximity_Tester.test_Spatial_Proximity ________________________________________________________________ self = def test_Spatial_Proximity(self): s_map = gpd.read_file(load_example("Sacramento1").get_path("sacramentot2.shp")) > df = s_map[['geometry', 'HISP', 'TOT_POP']] segregation/tests/test_spatial_proximity.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/geopandas/geodataframe.py:1299: in __getitem__ result = super(GeoDataFrame, self).__getitem__(key) ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/frame.py:3461: in __getitem__ indexer = self.loc._get_listlike_indexer(key, axis=1)[1] ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1314: in _get_listlike_indexer self._validate_read_indexer(keyarr, indexer, axis) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = , key = Index(['geometry', 'HISP', 'TOT_POP'], dtype='object'), indexer = array([31, -1, 2]), axis = 1 def _validate_read_indexer(self, key, indexer, axis: int): """ Check that indexer can be used to return a result. e.g. at least one element was found, unless the list of keys was actually empty. Parameters ---------- key : list-like Targeted labels (only used to show correct error message). indexer: array-like of booleans Indices corresponding to the key, (with -1 indicating not found). axis : int Dimension on which the indexing is being made. Raises ------ KeyError If at least one key was requested but none was found. """ if len(key) == 0: return # Count missing values: missing_mask = indexer < 0 missing = (missing_mask).sum() if missing: ax = self.obj._get_axis(axis) # TODO: remove special-case; this is just to keep exception # message tests from raising while debugging use_interval_msg = isinstance(ax, IntervalIndex) or ( isinstance(ax, CategoricalIndex) and isinstance(ax.categories, IntervalIndex) ) if missing == len(indexer): axis_name = self.obj._get_axis_name(axis) if use_interval_msg: key = list(key) raise KeyError(f"None of [{key}] are in the [{axis_name}]") not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) > raise KeyError(f"{not_found} not in index") E KeyError: "['HISP'] not in index" ../miniconda3/envs/ci39_segregation/lib/python3.9/site-packages/pandas/core/indexing.py:1377: KeyError ============================================================================ short test summary info ============================================================================ FAILED segregation/tests/test_absolute_centralization.py::Absolute_Centralization_Tester::test_Absolute_Centralization - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_absolute_clustering.py::Absolute_Clustering_Tester::test_Absolute_Clustering - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_absolute_concentration.py::Absolute_Concentration_Tester::test_Absolute_Concentration - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_atkinson.py::Atkinson_Tester::test_Atkinson - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_batch_compute.py::test_batch_single - ValueError: group_pop_var and total_pop_var columns must be present on the dataframe FAILED segregation/tests/test_batch_compute.py::test_batch_multi - KeyError: "None of [Index(['HISP', 'BLACK', 'WHITE'], dtype='object')] are in the [columns]" FAILED segregation/tests/test_batch_compute.py::test_batch_multiscalar_multi - KeyError: "None of [Index(['HISP', 'BLACK', 'WHITE'], dtype='object')] are in the [columns]" FAILED segregation/tests/test_batch_compute.py::test_batch_multiscalar_single - ValueError: group_pop_var and total_pop_var columns must be present on the dataframe FAILED segregation/tests/test_bias_corrected_dissimilarity.py::Bias_Corrected_Dissim_Tester::test_Bias_Corrected_Dissim - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_boundary_spatial_dissimilarity.py::Boundary_Spatial_Dissim_Tester::test_Boundary_Spatial_Dissim - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_conprof.py::Con_Prof_Tester::test_Con_Prof - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_correlationr.py::Correlation_R_Tester::test_Correlation_R - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_decomposition.py::Decomposition_Tester::test_Decomposition - ValueError: group_pop_var and total_pop_var columns must be present on the dataframe FAILED segregation/tests/test_delta.py::Delta_Tester::test_Delta - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_density_corrected_dissimilarity.py::Density_Corrected_Dissim_Tester::test_Density_Corrected_Dissim - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_dissim.py::Dissim_Tester::test_Dissim - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_distance_decay_interaction.py::Distance_Decay_Interaction_Tester::test_Distance_Decay_Interaction - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_distance_decay_isolation.py::Distance_Decay_Isolation_Tester::test_Distance_Decay_Isolation - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_entropy.py::Entropy_Tester::test_Entropy - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_gini_seg.py::Gini_Seg_Tester::test_Gini_Seg - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_inference.py::Inference_Tester::test_Inference - ValueError: group_pop_var and total_pop_var columns must be present on the dataframe FAILED segregation/tests/test_interaction.py::Interaction_Tester::test_Interaction - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_isolation.py::Isolation_Tester::test_Isolation - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_local_multi_local_diversity.py::Multi_Local_Diversity_Tester::test_Multi_Local_Diversity - KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN',... FAILED segregation/tests/test_local_multi_local_entropy.py::Multi_Local_Entropy_Tester::test_Multi_Local_Entropy - KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP... FAILED segregation/tests/test_local_multi_local_simpson_concentration.py::Multi_Local_Simpson_Concentration_Tester::test_Multi_Local_Simpson_Concentration - KeyError: "None o... FAILED segregation/tests/test_local_multi_local_simpson_interaction.py::Multi_Local_Simpson_Interaction_Tester::test_Multi_Local_Simpson_Interaction - KeyError: "None of [Ind... FAILED segregation/tests/test_local_multi_location_quotient.py::Multi_Location_Quotient_Tester::test_Multi_Location_Quotient - KeyError: "None of [Index(['WHITE', 'BLACK', 'A... FAILED segregation/tests/test_local_relative_centralization.py::Local_Relative_Centralization_Tester::test_Local_Relative_Centralization - KeyError: "['BLACK'] not in index" FAILED segregation/tests/test_min_max_s.py::SpatialMinMax_Tester::test_SpatialMinMax - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_modified_dissimilarity.py::Modified_Dissim_Tester::test_Modified_Dissim - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_modified_gini.py::Modified_Gini_Seg_Tester::test_Modified_Gini - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_multi_dissim.py::Multi_Dissim_Tester::test_Multi_Dissim - KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object')] are in... FAILED segregation/tests/test_multi_divergence.py::Multi_Divergence_Tester::test_Multi_Divergence - KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='obje... FAILED segregation/tests/test_multi_diversity.py::Multi_Diversity_Tester::test_Multi_Diversity - KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object'... FAILED segregation/tests/test_multi_gini_seg.py::Multi_Gini_Seg_Tester::test_Multi_Gini_Seg - KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'HISP'], dtype='object')] ... FAILED segregation/tests/test_multi_information_theory.py::Multi_Information_Theory_Tester::test_Multi_Information_Theory - KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIA... FAILED segregation/tests/test_multi_normalized_exposure.py::Multi_Normalized_Exposure_Tester::test_Multi_Multi_Normalized_Exposure - KeyError: "None of [Index(['WHITE', 'BLAC... FAILED segregation/tests/test_multi_relative_diversity.py::Multi_Relative_Diversity_Tester::test_Multi_Relative_Diversity - KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIA... FAILED segregation/tests/test_multi_simpsons_concentration.py::Simpsons_Concentration_Tester::test_Simpsons_Concentration - KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIA... FAILED segregation/tests/test_multi_simpsons_interaction.py::Simpsons_Interaction_Tester::test_Simpsons_Interaction - KeyError: "None of [Index(['WHITE', 'BLACK', 'ASIAN', 'H... FAILED segregation/tests/test_multi_squared_coefficient_of_variation.py::Multi_Squared_Coefficient_of_Variation_Tester::test_Multi_Squared_Coefficient_of_Variation - KeyError... FAILED segregation/tests/test_multiscalar_profile.py::test_multiscalar - KeyError: "None of [Index(['HISP', 'BLACK', 'WHITE'], dtype='object')] are in the [columns]" FAILED segregation/tests/test_multiscalar_profile.py::test_multiscalar_network - KeyError: "None of [Index(['HISP', 'BLACK', 'WHITE'], dtype='object')] are in the [columns]" FAILED segregation/tests/test_network.py::Network_Tester::test_calc_access - KeyError: "['WHITE', 'BLACK', 'ASIAN', 'HISP'] not in index" FAILED segregation/tests/test_perimeter_area_ratio_spatial_dissimilarity.py::Perimeter_Area_Ratio_Spatial_Dissim_Tester::test_Perimeter_Area_Ratio_Spatial_Dissim - KeyError: ... FAILED segregation/tests/test_relative_centralization.py::Relative_Centralization_Tester::test_Relative_Centralization - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_relative_clustering.py::Relative_Clustering_Tester::test_Relative_Clustering - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_relative_concentration.py::Relative_Concentration_Tester::test_Relative_Concentration - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_spatial_dissimilarity.py::Spatial_Dissim_Tester::test_Spatial_Dissim - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_spatial_prox_profile.py::Spatial_Prox_Prof_Tester::test_Spatial_Prox_Prof - KeyError: "['HISP'] not in index" FAILED segregation/tests/test_spatial_proximity.py::Spatial_Proximity_Tester::test_Spatial_Proximity - KeyError: "['HISP'] not in index" ================================================================== 52 failed, 1 passed, 104 warnings in 39.39s ================================================================== ```
knaaptime commented 3 years ago

i think the issue is the libpysal datasets that pull from uchicago have updated, so you need to re-download them

jGaboardi commented 3 years ago

ahhhhh. Is this something that needs to be fixed in libpysal then?

knaaptime commented 3 years ago

there's nothing technically wrong, but the column names have changed upstream on one of the sacramento datasets. The issue is the old versions are cached on your machine, so libpysal is defaulting to the local paths. Try deleting the pysal_data dir from your user folder then re-fetching the data or running the tests again

jGaboardi commented 3 years ago

All tests now passing locally. Thanks for the assist!