[SciPy-dev] python pow versus np.power

josef.pktd at gmail.com josef.pktd at gmail.com
Thu Apr 2 14:35:17 EDT 2009


On Thu, Apr 2, 2009 at 1:29 PM, Robert Kern <robert.kern at gmail.com> wrote:
> On Thu, Apr 2, 2009 at 09:11,  <josef.pktd at 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