[SciPy-dev] python pow versus np.power

josef.pktd@gmai... josef.pktd@gmai...
Thu Apr 2 13:35:17 CDT 2009


On Thu, Apr 2, 2009 at 1:29 PM, Robert Kern <robert.kern@gmail.com> wrote:
> On Thu, Apr 2, 2009 at 09:11,  <josef.pktd@gmail.com> wrote:
>> In stats distribution, I don't want exceptions to be raised for corner
>> cases. In many places python builtin pow is used which cannot handle
>> several cases.
>> Until now I switched to the use of np.power for each individual case
>> when there where problems.
>>
>> Is there any strong reason not to change all occurrences of pow to np.power?
>> It would provide a more robust implementation, even if there is a
>> small performance hit.
>
> In scipy? Probably not. Go for it.
>

Thanks, it will be only for stats.distributions

Josef


More information about the Scipy-dev mailing list