Did I find the right examples for you? yes no

All Samples(54)  |  Call(44)  |  Derive(0)  |  Import(10)

        def convtypecode(typecode, dtype=None):
    if dtype is None:
        try:
            return oldtype2dtype[typecode]
        except:
            return np.dtype(typecode)
    else:
        return dtype
        


src/s/p/Spherebot-Host-GUI-HEAD/InkscapePortable/App/Inkscape/python/Lib/site-packages/numpy/oldnumeric/functions.py   Spherebot-Host-GUI(Download)
import numpy.core.multiarray as mu
import numpy.core.numeric as nn
from typeconv import convtypecode, convtypecode2
 
__all__ = ['take', 'repeat', 'sum', 'product', 'sometrue', 'alltrue',
def ones(shape, typecode='l', savespace=0, dtype=None):
    """ones(shape, dtype=int) returns an array of the given
    dimensions which is initialized to all ones.
    """
    dtype = convtypecode(typecode,dtype)
def zeros(shape, typecode='l', savespace=0, dtype=None):
    """zeros(shape, dtype=int) returns an array of the given
    dimensions which is initialized to all zeros
    """
    dtype = convtypecode(typecode,dtype)
def identity(n,typecode='l', dtype=None):
    """identity(n) returns the identity 2-d array of shape n x n.
    """
    dtype = convtypecode(typecode, dtype)
    return nn.identity(n, dtype)
 
def empty(shape, typecode='l', dtype=None):
    dtype = convtypecode(typecode, dtype)

src/p/y/Pymol-script-repo-HEAD/modules/pdb2pqr/contrib/numpy-1.1.0/numpy/oldnumeric/functions.py   Pymol-script-repo(Download)
import numpy.core.multiarray as mu
import numpy.core.numeric as nn
from typeconv import convtypecode, convtypecode2
 
__all__ = ['take', 'repeat', 'sum', 'product', 'sometrue', 'alltrue',
def ones(shape, typecode='l', savespace=0, dtype=None):
    """ones(shape, dtype=int) returns an array of the given
    dimensions which is initialized to all ones.
    """
    dtype = convtypecode(typecode,dtype)
def zeros(shape, typecode='l', savespace=0, dtype=None):
    """zeros(shape, dtype=int) returns an array of the given
    dimensions which is initialized to all zeros
    """
    dtype = convtypecode(typecode,dtype)
def identity(n,typecode='l', dtype=None):
    """identity(n) returns the identity 2-d array of shape n x n.
    """
    dtype = convtypecode(typecode, dtype)
    return nn.identity(n, dtype)
 
def empty(shape, typecode='l', dtype=None):
    dtype = convtypecode(typecode, dtype)

src/n/u/nupic-linux64-HEAD/lib64/python2.6/site-packages/numpy/oldnumeric/functions.py   nupic-linux64(Download)
import numpy.core.multiarray as mu
import numpy.core.numeric as nn
from typeconv import convtypecode, convtypecode2
 
__all__ = ['take', 'repeat', 'sum', 'product', 'sometrue', 'alltrue',
def ones(shape, typecode='l', savespace=0, dtype=None):
    """ones(shape, dtype=int) returns an array of the given
    dimensions which is initialized to all ones.
    """
    dtype = convtypecode(typecode,dtype)
def zeros(shape, typecode='l', savespace=0, dtype=None):
    """zeros(shape, dtype=int) returns an array of the given
    dimensions which is initialized to all zeros
    """
    dtype = convtypecode(typecode,dtype)
def identity(n,typecode='l', dtype=None):
    """identity(n) returns the identity 2-d array of shape n x n.
    """
    dtype = convtypecode(typecode, dtype)
    return nn.identity(n, dtype)
 
def empty(shape, typecode='l', dtype=None):
    dtype = convtypecode(typecode, dtype)

src/m/i/MissionPlanner-HEAD/Lib/site-packages/numpy/oldnumeric/functions.py   MissionPlanner(Download)
import numpy.core.multiarray as mu
import numpy.core.numeric as nn
from typeconv import convtypecode, convtypecode2
 
__all__ = ['take', 'repeat', 'sum', 'product', 'sometrue', 'alltrue',
def ones(shape, typecode='l', savespace=0, dtype=None):
    """ones(shape, dtype=int) returns an array of the given
    dimensions which is initialized to all ones.
    """
    dtype = convtypecode(typecode,dtype)
def zeros(shape, typecode='l', savespace=0, dtype=None):
    """zeros(shape, dtype=int) returns an array of the given
    dimensions which is initialized to all zeros
    """
    dtype = convtypecode(typecode,dtype)
def identity(n,typecode='l', dtype=None):
    """identity(n) returns the identity 2-d array of shape n x n.
    """
    dtype = convtypecode(typecode, dtype)
    return nn.identity(n, dtype)
 
def empty(shape, typecode='l', dtype=None):
    dtype = convtypecode(typecode, dtype)

src/n/u/numpy-1.8.1/numpy/oldnumeric/functions.py   numpy(Download)
import numpy.core.multiarray as mu
import numpy.core.numeric as nn
from .typeconv import convtypecode, convtypecode2
 
__all__ = ['take', 'repeat', 'sum', 'product', 'sometrue', 'alltrue',
def ones(shape, typecode='l', savespace=0, dtype=None):
    """ones(shape, dtype=int) returns an array of the given
    dimensions which is initialized to all ones.
    """
    dtype = convtypecode(typecode, dtype)
def zeros(shape, typecode='l', savespace=0, dtype=None):
    """zeros(shape, dtype=int) returns an array of the given
    dimensions which is initialized to all zeros
    """
    dtype = convtypecode(typecode, dtype)
def identity(n,typecode='l', dtype=None):
    """identity(n) returns the identity 2-d array of shape n x n.
    """
    dtype = convtypecode(typecode, dtype)
    return nn.identity(n, dtype)
 
def empty(shape, typecode='l', dtype=None):
    dtype = convtypecode(typecode, dtype)

src/s/p/Spherebot-Host-GUI-HEAD/InkscapePortable/App/Inkscape/python/Lib/site-packages/numpy/oldnumeric/mlab.py   Spherebot-Host-GUI(Download)
import numpy as np
 
from typeconv import convtypecode
 
def eye(N, M=None, k=0, typecode=None, dtype=None):
    """ eye returns a N-by-M 2-d array where the  k-th diagonal is all ones,
        and everything else is zeros.
    """
    dtype = convtypecode(typecode, dtype)
def tri(N, M=None, k=0, typecode=None, dtype=None):
    """ returns a N-by-M array where all the diagonals starting from
        lower left corner up to the k-th are all ones.
    """
    dtype = convtypecode(typecode, dtype)

src/p/y/Pymol-script-repo-HEAD/modules/pdb2pqr/contrib/numpy-1.1.0/numpy/oldnumeric/mlab.py   Pymol-script-repo(Download)
import numpy as nn
 
from typeconv import convtypecode
 
def eye(N, M=None, k=0, typecode=None, dtype=None):
    """ eye returns a N-by-M 2-d array where the  k-th diagonal is all ones,
        and everything else is zeros.
    """
    dtype = convtypecode(typecode, dtype)
def tri(N, M=None, k=0, typecode=None, dtype=None):
    """ returns a N-by-M array where all the diagonals starting from
        lower left corner up to the k-th are all ones.
    """
    dtype = convtypecode(typecode, dtype)

src/n/u/nupic-linux64-HEAD/lib64/python2.6/site-packages/numpy/oldnumeric/mlab.py   nupic-linux64(Download)
import numpy as np
 
from typeconv import convtypecode
 
def eye(N, M=None, k=0, typecode=None, dtype=None):
    """ eye returns a N-by-M 2-d array where the  k-th diagonal is all ones,
        and everything else is zeros.
    """
    dtype = convtypecode(typecode, dtype)
def tri(N, M=None, k=0, typecode=None, dtype=None):
    """ returns a N-by-M array where all the diagonals starting from
        lower left corner up to the k-th are all ones.
    """
    dtype = convtypecode(typecode, dtype)

src/m/i/MissionPlanner-HEAD/Lib/site-packages/numpy/oldnumeric/mlab.py   MissionPlanner(Download)
import numpy as np
 
from typeconv import convtypecode
 
def eye(N, M=None, k=0, typecode=None, dtype=None):
    """ eye returns a N-by-M 2-d array where the  k-th diagonal is all ones,
        and everything else is zeros.
    """
    dtype = convtypecode(typecode, dtype)
def tri(N, M=None, k=0, typecode=None, dtype=None):
    """ returns a N-by-M array where all the diagonals starting from
        lower left corner up to the k-th are all ones.
    """
    dtype = convtypecode(typecode, dtype)

src/n/u/numpy-1.8.1/numpy/oldnumeric/mlab.py   numpy(Download)
import numpy as np
 
from .typeconv import convtypecode
 
def eye(N, M=None, k=0, typecode=None, dtype=None):
    """ eye returns a N-by-M 2-d array where the  k-th diagonal is all ones,
        and everything else is zeros.
    """
    dtype = convtypecode(typecode, dtype)
def tri(N, M=None, k=0, typecode=None, dtype=None):
    """ returns a N-by-M array where all the diagonals starting from
        lower left corner up to the k-th are all ones.
    """
    dtype = convtypecode(typecode, dtype)

  1 | 2  Next