Opened 9 years ago

Last modified 5 years ago

#8897 new defect

units.mass.pound to units.mass.drachma broken

Reported by: schilly Owned by: burcin
Priority: major Milestone: sage-6.4
Component: symbolics Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

sage: a = 170*units.mass.pound
sage: a.convert(units.mass.drachma)

gives

TypeError: unable to convert x (=kilogram) to an integer

despite 1 drachma is 0.00429234 kilograms.

Change History (5)

comment:1 Changed 7 years ago by aginiewicz

Same is true for other units of mass or time, that contains tuples in unitdict:

sage: sage.symbolic.units.unitdict['mass']['obol']
"(0.000715380000000000,{'greek':1/6})"
sage: sage.symbolic.units.unitdict['mass']['drachma']
"(0.00429234000000000, {'greek':1})"
sage: sage.symbolic.units.unitdict['mass']['mina']   
"(0.429234000000000, {'greek':100})"
sage: sage.symbolic.units.unitdict['mass']['talent']
"(25.7540400000000, {'greek':6000})"
sage: sage.symbolic.units.unitdict['time']['sidereal_second']
"(0.997269566329086, {'sidereal':1})"
sage: sage.symbolic.units.unitdict['time']['sidereal_day']
"(86164.0905308330, {'sidereal':86400})"

all those result in same "unable to convert x to an integer", coming from:

sage: sage.symbolic.units.base_units(units.time.sidereal_second)

comment:2 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:3 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:4 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:5 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.