Did I find the right examples for you? yes no

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

src/a/s/astropy-0.3.1/astropy/units/core.py   astropy(Download)
from ..utils.exceptions import AstropyWarning
from ..utils.misc import isiterable
from .utils import is_effectively_unity, validate_power
from . import format as unit_format
                if not isinstance(base, UnitBase):
                    raise TypeError("bases must be sequence of UnitBase instances")
            powers = [validate_power(p, support_tuples=True) for p in powers]
        self._scale = scale
        self._bases = [x[0] for x in new_parts]
        self._powers = [validate_power(x[1], support_tuples=True) for x in new_parts]
        if is_effectively_unity(scale):

src/a/s/astropy-0.3.1/astropy/units/quantity.py   astropy(Download)
from ..utils.compat.misc import override__dir__
from ..utils.misc import isiterable
from .utils import validate_power
                p = args[1].to(dimensionless_unscaled).value
            result_unit = result_unit ** validate_power(p)
        # We now prepare the output object