10000 Maintenance/1.10.x by chiffa · Pull Request #7354 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Maintenance/1.10.x #7354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 288 commits into from
Closed

Maintenance/1.10.x #7354

wants to merge 288 commits into from

Conversation

chiffa
Copy link
Contributor
@chiffa chiffa commented Feb 27, 2016

Added this example for pad function in arraypad.py:

    >>> a = [[1, 2], [3, 4]]
    >>> a = np.lib.pad(a, ((3, 2), (2, 3)), 'constant',
                 constant_values=np.array(((-1, -2), (-3, -4))))
    array([[-3 -3 -1 -1 -4 -4 -4]
           [-3 -3 -1 -1 -4 -4 -4]
           [-3 -3 -1 -1 -4 -4 -4]
           [-3 -3  1  2 -4 -4 -4]
           [-3 -3  3  4 -4 -4 -4]
           [-3 -3 -2 -2 -4 -4 -4]
           [-3 -3 -2 -2 -4 -4 -4]])

with respect to undocumented change in behavior from issue #7353

charris and others added 30 commits August 20, 2015 09:23
Backport of gh-6211 - fix Linux build with Intel compilers
npyiter can change its inner stride when it is buffered, this
happens in some cases (the test is one of these) mostly for weirdly
strided arrays. The test does depend on the buffer size being used.

closes gh-6221
It may be that you can say that it cannot happen when grow inner
is not enabled as well.
BUG: simplify code remove strict aliasing violation
BUG: Fix refcounting for string comparison in array_richcompare
Timedelta multiplication and division relied on undefined behaviour for some
inputs, which would give the expected results on x86 but not on armv7l
(e.g. Raspberry Pi 2).  Closes #6274.
Backport-gh-6275 BUG: fix timedelta arithmetic with invalid values or NaTs
REL: Reset strides for RELAXED_STRIDE_CHECKING for 1.10 release.
Issue: _exec_command function doesn't close 'so_dup' and 'se_dup' file
descriptors.SciPy try to build scipy\special\amos\zunik.f and
crash:error: Command "C:\Program Files (x86)\Intel\Composer XE
2015\bin\intel64\ifort.exe /nologo /MD /nbs /names:lowercase
/assume:underscore /O1
-IC:\Python27\lib\site-packages\numpy\core\include -c /c
scipy\special\amos\zunik.f
/Fobuild\temp.win-amd64-2.7\scipy\special\amos\zunik.o" failed with
exit status -1073741502
behavior affect at least python 3.5 and SciPy build and build failed.
During initialization <python>.distutils.MSVCCompiler replace Intel
environment('include' and 'lib' paths). This fix decorate 'initialize'
function in MSVCCompiler and extend 'lib' and 'include' environment
variables. Changed compilation keys: generate optimized code
specialized for Intel processors with SSE4.2 support.
distutils.msvccompiler.MSVCCompiler
The extra_link_args is sadly not intrinsically used
for many parts of the system_info code.

This commit adds the linking properties stored
when using extra_link_args in the openblas section
to bypass any difficulties in the usage of OpenBLAS.

This is especially helpful when linking against external
LAPACK libraries which requires -lgfortran and possibly
-lm for correct linking.
The pavement script was not using the new '.dev0+' GIT_REVISION[:7]
suffix for development releases.
Those files in numpy/core/src/multiarray were only included in source
distributions when HAVE_CBLAS was defined, making the distribution
contents depend on the local configuration.

Closes #6343.
Added tests for the x.x.dev0+1234567 form  together with alpha and beta
versions of same.

Updates lifted from scipy.
This was buggy, because the underlying functions supported it
partially but cond was not aware of this.

Closes gh-6351
BUG,ENH: allow linalg.cond to work on a stack of matrices
charris and others added 22 commits January 5, 2016 16:25
DOC,BUG: Fix some latex generation problems.
There were problems with the PyPi upload, so make a 1.10.4 release.
The new 1.10.4-notes are copies of the old 1.10.3-notes, and the
latter have been marked void.

[ci skip]
MAINT: Constrain `pip` and `setuptools` versions (Python 3.2 support) (NumPy 1.10.x Backport)
Traceback (most recent call last):
  File "C:/Users/Andrei/PycharmProjects/Pharmacosensitivity_growth_assays/src/post_processing.py", line 477, in <module>
    all_cell_lines_arr, means_accumulator, errs_accumulator, names_accumulator = stack_data_in_range_of_interest(concs_effective_range)
  File "C:/Users/Andrei/PycharmProjects/Pharmacosensitivity_growth_assays/src/post_processing.py", line 129, in stack_data_in_range_of_interest
    mode='constant', constant_values=((np.nan, np.nan), (np.nan, np.nan)))
  File "C:\Anaconda\lib\site-packages\numpy\lib\arraypad.py", line 1358, in pad
    cast_to_int=False)
  File "C:\Anaconda\lib\site-packages\numpy\lib\arraypad.py", line 1070, in _normalize_shape
    return tuple(tuple(axis) for axis in arr.tolist())
AttributeError: 'tuple' object has no attribute 'tolist'
@njsmith
Copy link
Member
njsmith commented Feb 27, 2016
  • Something's gone wrong with your git branches
  • All fixes should go to master first, not directly to maintenance branches
  • The proper fix here is probably to fix arraypad to accept the old syntax so that the old docs become right again :-)

@chiffa
Copy link
Contributor Author
chiffa commented Feb 27, 2016

Ok, took note about master and branch, will try when I have a bit more time to dig in depth.

The behavior of the constant padding in multiple dimensions was never documented, which I guess led the the failure of detecting the change in the behavior. Should I still add it into the docstrings? I assume they are run as unit-tests during the continuous integration, right?

Should I also investigate the weird behavior of the np.nan that gets converted to a signed 32 bit integer?

@njsmith
Copy link
Member
njsmith commented Feb 27, 2016

The behavior of the constant padding in multiple dimensions was never documented, which I guess led the the failure of detecting the change in the behavior. Should I still add it into the docstrings? I assume they are run as unit-tests during the continuous integration, right?

No, we don't test docstrings. If this is behavior that you were depending on and we broke it, though, then the usual default assumption would be that that's a bug and we should fix it (regardless of whether it was actually documented or tested). If it turns out there was some good reason why it was broken or similar than that might change, but if it's just a matter of coercing array-like inputs into real arrays then it's probably just a bug. And if you want to submit a fix then you should certainly also add a test at the same time, and documentation if that makes sense.

Should I also investigate the weird behavior of the np.nan that gets converted to a signed 32 bit integer?

This is sorta-intentional, in that if you insist on casting from float to integer then we map nan to the smallest possible integer (which doesn't make much sense, but no other options make any more sense). However, it is probably a bug that we are allowing floats here to be silently cast to integer at all -- trying to pad an integer array with floats should raise an error in general.

@njsmith
Copy link
Member
njsmith commented Feb 27, 2016

Closing this pull request due to git being difficult -- feel free to re-open a new one :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0