py-econometrics / pyfixest

Fast High-Dimensional Fixed Effects Regression in Python following fixest-syntax
https://py-econometrics.github.io/pyfixest/
MIT License
179 stars 35 forks source link

Use consistent error classes #701

Closed leostimpfle closed 2 weeks ago

leostimpfle commented 2 weeks ago

Some of pyfixest's custom error classes in pyfixest.errors duplicate Python's built-in exceptions, for example NotImplementedError:

https://github.com/py-econometrics/pyfixest/blob/f1c8a59e86adead07df879d928c588a58206f538/pyfixest/errors/__init__.py#L41

For consistency, we should always use Python's built-in exceptions and remove duplicate errors in pyfixest.errors, for example here:

https://github.com/py-econometrics/pyfixest/blob/f1c8a59e86adead07df879d928c588a58206f538/pyfixest/estimation/fepois_.py#L10

A list of Python's built-in errors is available here.