def ensure_ndarray(ndarray_or_adjusted_array):
    if isinstance(ndarray_or_adjusted_array, ndarray):
        return ndarray_or_adjusted_array
    elif isinstance(ndarray_or_adjusted_array, AdjustedArray):
        return ndarray_or_adjusted_array.data
    else:
        raise TypeError(
            "Can't convert %s to ndarray" %
            type(ndarray_or_adjusted_array).__name__
        )
A parse candidate is a wrapper object holding a link hash of this
dataset/ETHPy150Open quantopian/zipline/zipline/lib/adjusted_array.py/ensure_ndarray--crossover with--dataset/ETHPy150Open codelucas/newspaper/newspaper/article.py/Article.get_parse_candidate