(value, unit, axis)
| 51 | qc = munits.ConversionInterface() |
| 52 | |
| 53 | def convert(value, unit, axis): |
| 54 | if hasattr(value, 'units'): |
| 55 | return value.to(unit).magnitude |
| 56 | elif np.iterable(value): |
| 57 | try: |
| 58 | return [v.to(unit).magnitude for v in value] |
| 59 | except AttributeError: |
| 60 | return [Quantity(v, axis.get_units()).to(unit).magnitude |
| 61 | for v in value] |
| 62 | else: |
| 63 | return Quantity(value, axis.get_units()).to(unit).magnitude |
| 64 | |
| 65 | def default_units(value, axis): |
| 66 | if hasattr(value, 'units'): |