j2labs/schematics — pull request #156 by adamlwgriffiths (2013-09-08 07:23:22+00:00)
Title: Add NumpyType

This adds a NumpyType has more flexible validation for array types.

Conversion is available for lists and tuples.

Optional validation includes dtype, shape, size and ndim properties.

Strings are not permitted, although they can be converted to numpy arrays, in most cases this would be unintentional. The current code can permit this by passing a string in list form or in a numpy array.

The numpy type is in its own file to avoid making numpy a core dependency of Schematics.
The tests are not run if numpy is not present, making this purely optional.