mggg / ecological-inference

Ecological inference, in Python
MIT License
28 stars 11 forks source link

converting precinct_names to np.array so they save to netcdf correctly #104

Closed karink520 closed 2 years ago

karink520 commented 2 years ago

Before, passing the precinct_names to the .fit methods of TwoByTwoEI or RowByColumnEI as a pandas Series (as was done in the example notebooks) caused an error when saving an ei model with pyei's to_netcdf. With this update, the precinct_names are now converted internally to a numpy array so that the saving happens correctly, even if the user passes the precinct_names as a pandas.Series. Fixes #99