[Biopython-dev] Fwd: Feature: Python implementation of MMCIF parser (#33)

Peter Cock p.j.a.cock at googlemail.com
Mon Apr 23 20:47:02 UTC 2012


On Mon, Apr 23, 2012 at 9:32 PM, Eric Talevich <eric.talevich at gmail.com> wrote:
>
> Would it be more or less error-prone to simply replace every numpy
> import with this (after testing each module on PyPy):
>
> try:
>    import numpy
> except:
>    import numpypy as numpy
>

Maybe, but right now do any of our NumPy using modules
pass under PyPy? I don't believe so... but I haven't tried
a PyPy nightly build lately.

It was unfortunate that originally PyPy's micronumpy
pretended to by numpy, so that you'd write "import numpy"
and think it worked but be surprised later when something
fundamental like the dot function was missing, or 2D arrays.
That lead to a few nasty try/import lines in our unit tests.

Let's wait and see how PyPy's numpy support improves
before rushing to change any of our numpy imports. I am
hopefully that Bio.PDB will be fine in their next release,
whereas things using the NumPy C API will probably not be.

Peter




More information about the Biopython-dev mailing list