Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better handle of None objects #236

Open
mkruckow opened this issue Jan 9, 2024 · 0 comments
Open

Better handle of None objects #236

mkruckow opened this issue Jan 9, 2024 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Comments

@mkruckow
Copy link
Collaborator

mkruckow commented Jan 9, 2024

In the code an object is set to None, if not defined. This requires careful usage.

  1. Trying to access a sub-object/function, e.g. None.dtype will always fail. -> We always need to check for None before performing a sub-function or requesting a sub-object.
  2. Any mathematical operator will fail, if one of the variables is of NoneType. -> We shouldn't use None for any float or integer variables, but np.nan instead.

I'm not sure, whether there are other things, so feel free to add possible issues occurring from None objects!
Maybe there are some functions, which don't work with None objects, but most should. Thus, whenever you add a new function (including ones imported from modules) check that they can handle Nones or make sure, that there is a check before in the code!

@mkruckow mkruckow added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants