Null values (numpy.nan, for example) are not handled correctly in the min- and max-heaps since they always compare false to other values. There are two options for handling them:
Match numpy.sort behavior. Null values are moved to the end of a list containing them (TODO: Confirm that this is true even if ordering is reversed). This will cause the median container to be as large as the number of items that are pushed to it.
Ignore null values: The median container's length will be less than the number of items pushed in general, but ordering will work as is. If this is chosen, return true/false in push methods to report whether item was pushed to underlying data structures.
Null values (numpy.nan, for example) are not handled correctly in the min- and max-heaps since they always compare false to other values. There are two options for handling them: