[Numpy-discussion] copy/deepcopy pull request, Travis build failure

josef.pktd@gmai... josef.pktd@gmai...
Fri Oct 26 08:52:30 CDT 2012


On Fri, Oct 26, 2012 at 1:27 AM, David Warde-Farley
<d.warde.farley@gmail.com> wrote:
> On Fri, Oct 26, 2012 at 1:04 AM,  <josef.pktd@gmail.com> wrote:
>
>> Fine, I didn't understand that part correctly.
>>
>> I have no opinion in that case.
>> (In statsmodels we only use copy the array method and through np.array().)
>
> Do you implement __copy__ or __deepcopy__ on your objects? If not,
> client code using statsmodels might try to use the copy module and run
> into the same problem.

We don't implement either. I haven't heard yet of a use case for copying
a model or results instance in statsmodels (that doesn't have a more
memory efficient alternative).

I make a note about this if we need it in future.

(asides:
We had to work around pickling problems.
We try to use views instead of copies.
Nothing depends on fortran versus c order of arrays except speed, and
I think linalg will make copies if users provide data arrays with the
wrong properties.
We never systematically investigated differences in speed depending on
array order or views, and some differences will have changed with
recent numpy versions.
)

Josef

>
> David
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion


More information about the NumPy-Discussion mailing list