Ensure __eq__ and __ne__ work for all numpy versions