Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(58)  |  Call(53)  |  Derive(0)  |  Import(5)
Convert the input to a masked array of the given data-type.

No copy is performed if the input is already an `ndarray`. If `a` is
a subclass of `MaskedArray`, a base class `MaskedArray` is returned.

Parameters
----------
a : array_like
    Input data, in any form that can be converted to a masked array. This
    includes lists, lists of tuples, tuples, tuples of tuples, tuples(more...)

        def asarray(a, dtype=None, order=None):
    """
    Convert the input to a masked array of the given data-type.

    No copy is performed if the input is already an `ndarray`. If `a` is
    a subclass of `MaskedArray`, a base class `MaskedArray` is returned.

    Parameters
    ----------
    a : array_like
        Input data, in any form that can be converted to a masked array. This
        includes lists, lists of tuples, tuples, tuples of tuples, tuples
        of lists, ndarrays and masked arrays.
    dtype : dtype, optional
        By default, the data-type is inferred from the input data.
    order : {'C', 'F'}, optional
        Whether to use row-major ('C') or column-major ('FORTRAN') memory
        representation.  Default is 'C'.

    Returns
    -------
    out : MaskedArray
        Masked array interpretation of `a`.

    See Also
    --------
    asanyarray : Similar to `asarray`, but conserves subclasses.

    Examples
    --------
    >>> x = np.arange(10.).reshape(2, 5)
    >>> x
    array([[ 0.,  1.,  2.,  3.,  4.],
           [ 5.,  6.,  7.,  8.,  9.]])
    >>> np.ma.asarray(x)
    masked_array(data =
     [[ 0.  1.  2.  3.  4.]
     [ 5.  6.  7.  8.  9.]],
                 mask =
     False,
           fill_value = 1e+20)
    >>> type(np.ma.asarray(x))
    

    """
    return masked_array(a, dtype=dtype, copy=False, keep_mask=True, subok=False)
        


src/n/u/nupic-linux64-HEAD/lib64/python2.6/site-packages/numpy/ma/extras.py   nupic-linux64(Download)
 
import core as ma
from core import MaskedArray, MAError, add, array, asarray, concatenate, count, \
    filled, getmask, getmaskarray, make_mask_descr, masked, masked_array, \
    mask_or, nomask, ones, sort, zeros
        result = np.asarray(outarr, dtype=max_dtypes)
    else:
        result = asarray(outarr, dtype=max_dtypes)
        result.fill_value = ma.default_fill_value(result)
    return result
 
    """
    a = asarray(a)
    mask = a.mask
    ash = a.shape
 
    """
    x = asarray(x)
    if x.ndim != 2:
        raise NotImplementedError("compress2d works for 2D arrays only.")
 
    """
    a = asarray(a)
    if a.ndim != 2:
        raise NotImplementedError("compress2d works for 2D arrays only.")

src/m/i/MissionPlanner-HEAD/Lib/site-packages/numpy/ma/extras.py   MissionPlanner(Download)
 
import core as ma
from core import MaskedArray, MAError, add, array, asarray, concatenate, count, \
    filled, getmask, getmaskarray, make_mask_descr, masked, masked_array, \
    mask_or, nomask, ones, sort, zeros
        result = np.asarray(outarr, dtype=max_dtypes)
    else:
        result = asarray(outarr, dtype=max_dtypes)
        result.fill_value = ma.default_fill_value(result)
    return result
 
    """
    a = asarray(a)
    mask = a.mask
    ash = a.shape
 
    """
    x = asarray(x)
    if x.ndim != 2:
        raise NotImplementedError, "compress2d works for 2D arrays only."
 
    """
    a = asarray(a)
    if a.ndim != 2:
        raise NotImplementedError, "compress2d works for 2D arrays only."

src/s/p/Spherebot-Host-GUI-HEAD/InkscapePortable/App/Inkscape/python/Lib/site-packages/numpy/ma/extras.py   Spherebot-Host-GUI(Download)
 
import core as ma
from core import MaskedArray, MAError, add, array, asarray, concatenate, count,\
    filled, getmask, getmaskarray, make_mask_descr, masked, masked_array,\
    mask_or, nomask, ones, sort, zeros
        result = np.asarray(outarr, dtype=max_dtypes)
    else:
        result = asarray(outarr, dtype=max_dtypes)
        result.fill_value = ma.default_fill_value(result)
    return result
 
    """
    a = asarray(a)
    mask = a.mask
    ash = a.shape
 
    """
    x = asarray(x)
    if x.ndim != 2:
        raise NotImplementedError, "compress2d works for 2D arrays only."
 
    """
    a = asarray(a)
    if a.ndim != 2:
        raise NotImplementedError, "compress2d works for 2D arrays only."

src/p/y/Pymol-script-repo-HEAD/modules/pdb2pqr/contrib/numpy-1.1.0/numpy/ma/extras.py   Pymol-script-repo(Download)
 
import core
from core import MaskedArray, MAError, add, array, asarray, concatenate, count,\
    filled, getmask, getmaskarray, masked, masked_array, mask_or, nomask, ones,\
    sort, zeros
        result = np.asarray(outarr, dtype=max_dtypes)
    else:
        result = core.asarray(outarr, dtype=max_dtypes)
        result.fill_value = core.default_fill_value(result)
    return result
 
    """
    a = asarray(a)
    mask = a.mask
    ash = a.shape
 
    """
    x = asarray(x)
    if x.ndim != 2:
        raise NotImplementedError, "compress2d works for 2D arrays only."
 
    """
    a = asarray(a)
    if a.ndim != 2:
        raise NotImplementedError, "compress2d works for 2D arrays only."

src/n/u/numpy-1.8.1/numpy/ma/extras.py   numpy(Download)
 
from . import core as ma
from .core import MaskedArray, MAError, add, array, asarray, concatenate, count, \
    filled, getmask, getmaskarray, make_mask_descr, masked, masked_array, \
    mask_or, nomask, ones, sort, zeros
        result = np.asarray(outarr, dtype=max_dtypes)
    else:
        result = asarray(outarr, dtype=max_dtypes)
        result.fill_value = ma.default_fill_value(result)
    return result
 
    """
    a = asarray(a)
    mask = a.mask
    ash = a.shape
 
    """
    x = asarray(x)
    if x.ndim != 2:
        raise NotImplementedError("compress2d works for 2D arrays only.")
 
    """
    a = asarray(a)
    if a.ndim != 2:
        raise NotImplementedError("compress2d works for 2D arrays only.")