def _as_quantity(a):
    """Convert argument to a Quantity (or raise NotImplementedError)."""
    from astropy.units import Quantity
    try:
        return Quantity(a, copy=False, subok=True)
    except Exception:
        raise NotImplementedError
