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

Ljson nan fix #557

merged 9 commits into from Feb 20, 2015


None yet
2 participants

patricksnape commented Feb 19, 2015

Similar to the fix for 0.4.x, but with two extra additions:

  1. Python 3 fixes
  2. New method on Vectorizable objects: has_nan_values(). This method is just syntactic sugar for checking if a PointCloud, Image, or LandmarkGroup has nan values, in case you don't want to import them for example.

patricksnape added some commits Feb 19, 2015

Fix importing of builtin landmarks
Simple try/except pattern - try images then landmarks.
Allow loading of nan values for ljson
Now importing null values is correctly coerced to nan
instead of None

Also, added tests for this.
Handle null/nan values in ljson
When serializing nan values from menpo, they should go down
as null. When deserializing null values, they should be returned
as nan.
Merge pull request #556 from patricksnape/ljson_nan_fix
[0.4.x] Ljson nan/null fixes
Merge branch '0.4.x' into ljson_nan_fix
Python 3 fixes for ljson PR
Missing itertools from merge, use correct builtins string
when mocking and turn zip generator into list for serialization.
Features tests missing __init__
Makes Python 3 complain
Add has_nan_values to vectorizable objects
This checks if the vectorizable object contains any nan values.
This is very useful for things like landmarks that contains nan
Add has_nan_values to LandmarkGroup
This makes it simpler for importing to check it a landmark
group has nan values and thus is no good for building models.

This comment has been minimized.


jabooth commented Feb 20, 2015

Looks great, +1

jabooth added a commit that referenced this pull request Feb 20, 2015

@jabooth jabooth merged commit a0aca1e into menpo:master Feb 20, 2015

2 checks passed

continuous-integration/appveyor AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@jabooth jabooth removed the in progress label Feb 20, 2015

@jabooth jabooth deleted the patricksnape:ljson_nan_fix branch Feb 20, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment