summaryrefslogtreecommitdiff
path: root/numpy/oldnumeric/__init__.py
blob: 86cdf55f79d8970c0f50ada74dc0024814c1dd94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
"""Don't add these to the __all__ variable though

"""
from __future__ import division, absolute_import, print_function

import warnings

from numpy import *

_msg = "The oldnumeric module will be dropped in Numpy 1.9"
warnings.warn(_msg, ModuleDeprecationWarning)


def _move_axis_to_0(a, axis):
    if axis == 0:
        return a
    n = len(a.shape)
    if axis < 0:
        axis += n
    axes = list(range(1, axis+1)) + [0,] + list(range(axis+1, n))
    return transpose(a, axes)

# Add these
from .compat import *
from .functions import *
from .precision import *
from .ufuncs import *
from .misc import *

from . import compat
from . import precision
from . import functions
from . import misc
from . import ufuncs

import numpy
__version__ = numpy.__version__
del numpy

__all__ = ['__version__']
__all__ += compat.__all__
__all__ += precision.__all__
__all__ += functions.__all__
__all__ += ufuncs.__all__
__all__ += misc.__all__

del compat
del functions
del precision
del ufuncs
del misc

from numpy.testing import Tester
test = Tester().test
bench = Tester().bench