Changeset e66c9f9 in sasmodels


Ignore:
Timestamp:
Jan 8, 2016 10:25:34 AM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3a45c2c
Parents:
82c299f
Message:

allow for units as list of strings (for rpa model)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/generate.py

    re97170c re66c9f9  
    265265""" 
    266266 
    267 def format_units(par): 
    268     return RST_UNITS.get(par, par) 
     267def format_units(units): 
     268    return "string" if isinstance(units, list) else RST_UNITS.get(units, units) 
    269269 
    270270def make_partable(pars): 
     
    284284    lines = [ 
    285285        sep, 
    286         " ".join("%-*s" % (w, h) for w, h in zip(column_widths, PARTABLE_HEADERS)), 
     286        " ".join("%-*s" % (w, h) 
     287                 for w, h in zip(column_widths, PARTABLE_HEADERS)), 
    287288        sep, 
    288289        ] 
Note: See TracChangeset for help on using the changeset viewer.