Menu

#13 dimless = unit() should be part of PyUnits; dimensionless handling across parameters/values

v1.0_(example)
open
nobody
None
1
2015-05-27
2015-05-27
No

dimless = unit() is the only unit not in PyUnits/all_si_and_derived_units, but it should imo be there. I encountered this when parsing configuration strings into units objects, where one has to (annoyingly) special-case dimensionless quantities.

Also, I don't understand why daeParameters can be initialised with something like self.m.preg.pcontrol.pdrop_frac.SetValue(0.15), but daeVariables not:

self.m.thruster.gamma_t.SetInitialGuesses(1.12)
AttributeError: 'float' object has no attribute 'shape'

where

pdrop_frac = daet.daeParameter('pdrop_frac', unit(), self, '')
gamma_t = daet.daeVariable('gamma_t', no_t, self, '')

Versions: Windows 8.1, daetools-1.4.0-win32-py34, Python 3.4.2 32bit (Anaconda)

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB