on-internet
← Community

Is there a reasonable way to have different versions of None?

Stack Overflow ·

I am working in Python 3. Say you have a million beetles, and your task is to catalogue the size of their spots. So you will make a table, where each row is a beetle and the number in the row represent the size of spots; [[.3, 1.2, 0.5], [.6, .7], [1.4, .9, .5, .7], [.2, .3, .1, .7, .1]] Also, you decide to store this in a NumPy array, for which you pad the lists with None (NumPy will convert this to np.nan). [[.3, 1.2, 0.5, None, None], [.6, .7, None, None, None], [1.4, .9, .5, .7, None], [.2, .3, .1, .7, .1]] But there is a problem. Values represented as None can be None for one of three rea

Comments

Sign in or sign up to comment and upvote.

No comments yet.