Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 703e8d6

Browse files
committed
Move ma to numpy root. Fix unit tests. Remove references to numpy.core.ma.
1 parent 61f9f6d commit 703e8d6

23 files changed

Lines changed: 55 additions & 65 deletions

THANKS.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ Albert Strasheim for documentation, bug-fixes, regression tests and
3535
Stefan van der Walt for documentation, bug-fixes and regression-tests.
3636
Andrew Straw for help with http://www.scipy.org, documentation, and testing.
3737
David Cournapeau for documentation, bug-fixes, and code contributions including fast_clipping.
38+
Pierre Gerard-Marchant for his rewrite of the masked array functionality.

numpy/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def pkgload(*packages, **options):
4444
import fft
4545
import random
4646
import ctypeslib
47+
import ma
4748

4849
# Make these accessible from numpy name-space
4950
# but not imported in from numpy import *

numpy/core/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from numeric import *
1212
from fromnumeric import *
1313
from defmatrix import *
14-
import ma
1514
import defchararray as char
1615
import records as rec
1716
from records import *
@@ -24,7 +23,7 @@
2423
round_ as round
2524
from numeric import absolute as abs
2625

27-
__all__ = ['char','rec','memmap','ma']
26+
__all__ = ['char','rec','memmap']
2827
__all__ += numeric.__all__
2928
__all__ += fromnumeric.__all__
3029
__all__ += defmatrix.__all__

numpy/core/tests/test_regression.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ def check_bool(self,level=rlevel):
110110

111111
def check_masked_array(self,level=rlevel):
112112
"""Ticket #61"""
113-
x = N.core.ma.array(1,mask=[1])
113+
x = N.ma.array(1,mask=[1])
114114

115115
def check_mem_masked_where(self,level=rlevel):
116116
"""Ticket #62"""
117-
from numpy.core.ma import masked_where, MaskType
117+
from numpy.ma import masked_where, MaskType
118118
a = N.zeros((1,1))
119119
b = N.zeros(a.shape, MaskType)
120120
c = masked_where(b,a)
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
import operator
6666
#
6767
import numpy
68-
from numpy import bool_, complex_, float_, int_, object_, str_
68+
from numpy.core import bool_, complex_, float_, int_, object_, str_
6969

7070
import numpy.core.umath as umath
7171
import numpy.core.fromnumeric as fromnumeric

0 commit comments

Comments
 (0)