[IPython-User] ipyhton-physics module and arrays
Thomas Kluyver
takowl@gmail....
Thu Sep 13 17:00:42 CDT 2012
On 13 September 2012 11:44, Vasco Tenner <vasco@tenner.nl> wrote:
> I was wondering
> if I can apply the "// unit" syntax also inside arrays, something like:
>> ['3 km', '5km'] // m
I don't think the short syntax would work like that (parsing it would
be tricky), but the exension should put 'Quantity' (alias 'Q') in the
namespace, so you should be able to do something like:
a = [Q('3 km'), Q('5km')]
Thomas
More information about the IPython-User
mailing list