Did I find the right examples for you? yes no

All Samples(26)  |  Call(0)  |  Derive(0)  |  Import(26)

src/s/y/Sypy-HEAD/module/micronumpy/app_numpy.py   Sypy(Download)
import math
 
import _numpypy
 
 

src/s/y/Sypy-HEAD/module/micronumpy/test/test_numarray.py   Sypy(Download)
    def test_mul(self):
        import _numpypy
 
        a = _numpypy.array(range(5))
        b = a * a
    def test_init(self):
        import _numpypy
        a = _numpypy.zeros((2, 2))
        assert len(a) == 2
 
    def test_shape(self):
        import _numpypy
    def test_getsetitem(self):
        import _numpypy
        a = _numpypy.zeros((2, 3, 1))
        raises(IndexError, a.__getitem__, (2, 0, 0))
        raises(IndexError, a.__getitem__, (0, 3, 0))
    def test_slices(self):
        import _numpypy
        a = _numpypy.zeros((4, 3, 2))
        raises(IndexError, a.__getitem__, (4,))
        raises(IndexError, a.__getitem__, (3, 3))

src/s/y/Sypy-HEAD/module/micronumpy/test/test_dtypes.py   Sypy(Download)
    def test_hash(self):
        import _numpypy as numpy
        for tp, value in [
            (numpy.int8, 4),
            (numpy.int16, 5),
    def test_abstract_types(self):
        import _numpypy as numpy
        raises(TypeError, numpy.generic, 0)
        raises(TypeError, numpy.number, 0)
        raises(TypeError, numpy.integer, 0)
    def test_new(self):
        import _numpypy as np
        assert np.int_(4) == 4
        assert np.float_(3.4) == 3.4
 
    def test_bool(self):
        import _numpypy as numpy
 
        assert numpy.bool_.mro() == [numpy.bool_, numpy.generic, object]
        assert numpy.bool_(3) is numpy.True_
    def test_int8(self):
        import _numpypy as numpy
 
        assert numpy.int8.mro() == [numpy.int8, numpy.signedinteger, numpy.integer, numpy.number, numpy.generic, object]