#4 Add support for new numpy library

closed-fixed
None
5
2008-05-15
2006-12-10
Mike C. Fletcher
No

This is a fairly direct mechanical transition with a very small shim module (numerics.py) that provides the same interface for Numeric or numpy. Since FontTools only seems to use one or two entry points that have changed (mostly the byteswap method and the names for the type constants) the number of changes are fairly small throughout the library.

I've only actually tested with numpy, but Numeric *should* still work if I haven't made some stupid error.

Discussion

  • Patch to the library to allow for numpy use

     
    • assigned_to: nobody --> jvr
     
  • Logged In: YES
    user_id=34901
    Originator: YES

    File Added: numerics.py

     
  • The abstraction point module for numpy/Numeric

     
    Attachments
  • Paul Wise
    Paul Wise
    2007-08-25

    Logged In: YES
    user_id=35028
    Originator: NO

    There are a few unrelated changes in the patch, be good if you could remove them.

    Also, it might be better to leave the Int* functions as-is and add wrappers for the int* functions instead.

     
  • Paul Wise
    Paul Wise
    2008-05-15

    Logged In: YES
    user_id=35028
    Originator: NO

    Current CVS uses numpy instead of Numeric.

     
  • Paul Wise
    Paul Wise
    2008-05-15

    • status: open --> closed-fixed