[Numpy-discussion] Getting the only object in a zero dimensional array
Mon Apr 20 12:39:27 CDT 2009
I have a 0d array that looks like this:
myarray = array( 0.1234 )
This generates a TypeError:
I can get it's number using a hack like this... but it looks kind of
myval = myarray + 0.0
There must be a better way to do it, right? All I want is the correct
way to return the value of the only item in a 0d array.
-------------- next part --------------
This email does not create a legal relationship between any member of the
Cr=E9dit Agricole group and the recipient or constitute investment advice.
The content of this email should not be copied or disclosed (in whole or
part) to any other person. It may contain information which is
confidential, privileged or otherwise protected from disclosure. If you
are not the intended recipient, you should notify us and delete it from
your system. Emails may be monitored, are not secure and may be amended,
destroyed or contain viruses and in communicating with us such conditions
are accepted. Any content which does not relate to business matters is not
endorsed by us.
Calyon is authorised by the Comit=e9 des Etablissements de Cr=e9dit et des
Entreprises d'Investissement (CECEI) and supervised by the Commission Bancaire
in France and subject to limited regulation by the Financial Services Authority.
Details about the extent of our regulation by the Financial Services Authority
are available from us on request. Calyon is incorporated in France with limited
liability and registered in England & Wales. Registration number: FC008194.
Registered office: Broadwalk House, 5 Appold Street, London, EC2A 2DA.
This message and/or any attachments is intended for the sole use of its addressee.
If you are not the addressee, please immediately notify the sender and then destroy the message.
As this message and/or any attachments may have been altered without our knowledge, its content is not legally binding on CALYON Cr?dit Agricole CIB.
All rights reserved.
Ce message et ses pi?ces jointes est destin? ? l'usage exclusif de son destinataire.
Si vous recevez ce message par erreur, merci d'en aviser imm?diatement l'exp?diteur et de le d?truire ensuite.
Le pr?sent message pouvant ?tre alt?r? ? notre insu, CALYON Cr?dit Agricole CIB ne peut pas ?tre engag? par son contenu.
Tous droits r?serv?s.
More information about the Numpy-discussion