File tree Expand file tree Collapse file tree 3 files changed +60
-22
lines changed
Expand file tree Collapse file tree 3 files changed +60
-22
lines changed Original file line number Diff line number Diff line change 11"""
22"""
33
4- from quantities .units .unitquantity import UnitQuantity , UnitInformation
4+ from quantities .units .unitquantity import UnitQuantity , UnitInformation , \
5+ dimensionless
56from quantities .units .time import s
67
7- bit = bits = \
8- UnitInformation ('bit' )
9- count = counts = \
10- UnitInformation ('counts' )
11- Bd = baud = \
12- UnitQuantity ('Bd' , 1 / s )
13- bps = \
14- UnitQuantity ('bps' , bit / s )
15- cps = \
16- UnitQuantity ('cps' , 1 / s )
8+ bit = UnitInformation (
9+ 'bit' ,
10+ 1 * dimensionless ,
11+ aliases = ['bits' ]
12+ )
13+ B = byte = o = octet = UnitInformation (
14+ 'byte' ,
15+ 8 * bit ,
16+ symbol = 'B' ,
17+ aliases = ['bytes' , 'o' , 'octet' , 'octets' ]
18+ )
19+ count = counts = UnitInformation (
20+ 'count' ,
21+ 1 * dimensionless ,
22+ symbol = 'ct' ,
23+ aliases = ['cts' , 'counts' ]
24+ )
1725
18- del UnitQuantity , s
26+ Bd = baud = bps = UnitQuantity (
27+ 'baud' ,
28+ bit / s ,
29+ symbol = 'Bd' ,
30+ )
31+ cps = UnitQuantity (
32+ 'counts_per_second' ,
33+ count / s
34+ )
35+
36+ del UnitQuantity , s , dimensionless
Original file line number Diff line number Diff line change 33
44from quantities .units .unitquantity import UnitSubstance
55
6- mol = mole = \
7- UnitSubstance ('mol' )
6+ mol = mole = UnitSubstance (
7+ 'mole' ,
8+ symbol = 'mol'
9+ )
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
12"""
23"""
34
45from quantities .units .unitquantity import UnitTemperature
56
6- K = degK = kelvin = Kelvin = \
7- UnitTemperature ('K' )
8- degR = rankine = Rankine = \
9- UnitTemperature ('Rankine' , K / 1.8 )
10- degC = celsius = Celsius = \
11- UnitTemperature ('degC' , K )
12- degF = fahrenheit = Fahrenheit = \
13- UnitTemperature ('degF' , degR )
7+ K = degK = kelvin = Kelvin = UnitTemperature (
8+ 'Kelvin' ,
9+ symbol = 'K' ,
10+ aliases = ['degK' , 'kelvin' ]
11+ )
12+ degR = rankine = Rankine = UnitTemperature (
13+ 'Rankine' ,
14+ K / 1.8 ,
15+ symbol = '°R' ,
16+ aliases = ['degR' , 'rankine' ]
17+ )
18+ degC = celsius = Celsius = UnitTemperature (
19+ 'Celsius' ,
20+ K ,
21+ symbol = '°C' ,
22+ aliases = ['degC' , 'celsius' ]
23+ )
24+ degF = fahrenheit = Fahrenheit = UnitTemperature (
25+ 'Fahrenheit' ,
26+ K ,
27+ symbol = '°F' ,
28+ aliases = ['degF' , 'fahrenheit' ]
29+ )
30+ # Unicode has special compatibility characters for ℃ ℉, but their use is
31+ # discouraged by the unicode consortium.
You can’t perform that action at this time.
0 commit comments