[Numpy-discussion] round, fix, ceil, and floor for complex args
Charles R Harris
Mon Feb 4 13:24:09 CST 2008
On Feb 4, 2008 10:34 AM, Stuart Brorson <firstname.lastname@example.org> wrote:
> Hi --
> I'm fiddling with NumPy's chopping and truncating operators: round,
> fix, ceil, and floor. In the case where they are passed real args,
> they work just fine. However, I find that when they are passed
> complex args, I get the following:
> round -> works fine.
> ceil -> throws exception: 'complex' object has no attribute 'ceil'
> floor -> throws exception: 'complex' object has no attribute 'floor'
> fix -> throws exception: 'complex' object has no attribute 'floor'
> Please see the session log below for more details.
> My question: Is this a bug or a feature? It seems to me that if you
> implement round for complex args, then you need to also support ceil,
> floor, and fix for complex args, so it's a bug. But I thought I'd ask
> the developers what they thought before filing a ticket.
I think it would be reasonable to add these operations for consistency.
Useful is perhaps a different question.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion