Skip to content

Commit fec242a

Browse files
committed
merge master into branch
2 parents 8910c2c + fb425b7 commit fec242a

28 files changed

+971
-912
lines changed

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ include MANIFEST.in
88
include pytest.ini
99
include *.txt
1010
include site.cfg.example
11-
include numpy/random/_mtrand/generate_mtrand_c.py
1211
recursive-include numpy/random *.pyx *.pxd *.pyx.in *.pxd.in
1312
# Add build support that should go in sdist, but not go in bdist/be installed
1413
# Note that sub-directories that don't have __init__ are apparently not

doc/source/dev/governance/people.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,7 @@ NumFOCUS Subcommittee
5656
Institutional Partners
5757
----------------------
5858

59-
* UC Berkeley (Stefan van der Walt)
59+
* UC Berkeley (Stefan van der Walt, Matti Picus, Tyler Reddy)
6060

61+
* Quansight (Ralf Gommers, Hameer Abbasi)
6162

62-
Document history
63-
----------------
64-
65-
https://github.com/numpy/numpy/commits/master/doc/source/dev/governance/governance.rst

doc/source/user/quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1476,5 +1476,5 @@ Further reading
14761476
- The `Python tutorial <https://docs.python.org/tutorial/>`__
14771477
- :ref:`reference`
14781478
- `SciPy Tutorial <https://docs.scipy.org/doc/scipy/reference/tutorial/index.html>`__
1479-
- `SciPy Lecture Notes <https://www.scipy-lectures.org>`__
1479+
- `SciPy Lecture Notes <https://scipy-lectures.org>`__
14801480
- A `matlab, R, IDL, NumPy/SciPy dictionary <http://mathesaurus.sf.net/>`__

numpy/_build_utils/src/apple_sgemv_fix.c

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
#include <dlfcn.h>
3030
#include <stdlib.h>
3131
#include <stdio.h>
32+
#include <sys/types.h>
33+
#include <sys/sysctl.h>
34+
#include <string.h>
3235

3336
/* ----------------------------------------------------------------- */
3437
/* Original cblas_sgemv */
@@ -66,12 +69,35 @@ static int AVX_and_10_9 = 0;
6669
/* Dynamic check for AVX support
6770
* __builtin_cpu_supports("avx") is available in gcc 4.8,
6871
* but clang and icc do not currently support it. */
69-
#define cpu_supports_avx()\
70-
(system("sysctl -n machdep.cpu.features | grep -q AVX") == 0)
71-
72+
static inline int
73+
cpu_supports_avx()
74+
{
75+
int enabled, r;
76+
size_t length = sizeof(enabled);
77+
r = sysctlbyname("hw.optional.avx1_0", &enabled, &length, NULL, 0);
78+
if ( r == 0 && enabled != 0) {
79+
return 1;
80+
}
81+
else {
82+
return 0;
83+
}
84+
}
85+
7286
/* Check if we are using MacOS X version 10.9 */
73-
#define using_mavericks()\
74-
(system("sw_vers -productVersion | grep -q 10\\.9\\.") == 0)
87+
static inline int
88+
using_mavericks()
89+
{
90+
int r;
91+
char str[32] = {0};
92+
size_t size = sizeof(str);
93+
r = sysctlbyname("kern.osproductversion", str, &size, NULL, 0);
94+
if ( r == 0 && strncmp(str, "10.9", strlen("10.9")) == 0) {
95+
return 1;
96+
}
97+
else {
98+
return 0;
99+
}
100+
}
75101

76102
__attribute__((destructor))
77103
static void unloadlib(void)

numpy/core/_add_newdocs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4415,7 +4415,7 @@
44154415
Examples
44164416
--------
44174417
>>> np.geterrobj() # first get the defaults
4418-
[10000, 0, None]
4418+
[8192, 521, None]
44194419
44204420
>>> def err_handler(type, flag):
44214421
... print("Floating point error (%s), with flag %s" % (type, flag))
@@ -4424,7 +4424,7 @@
44244424
>>> old_err = np.seterr(divide='raise')
44254425
>>> old_handler = np.seterrcall(err_handler)
44264426
>>> np.geterrobj()
4427-
[20000, 2, <function err_handler at 0x91dcaac>]
4427+
[8192, 521, <function err_handler at 0x91dcaac>]
44284428
44294429
>>> old_err = np.seterr(all='ignore')
44304430
>>> np.base_repr(np.geterrobj()[1], 8)
@@ -4479,7 +4479,7 @@
44794479
--------
44804480
>>> old_errobj = np.geterrobj() # first get the defaults
44814481
>>> old_errobj
4482-
[10000, 0, None]
4482+
[8192, 521, None]
44834483
44844484
>>> def err_handler(type, flag):
44854485
... print("Floating point error (%s), with flag %s" % (type, flag))

0 commit comments

Comments
 (0)