question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ENH: Automatic copy on overlap

See original GitHub issue

Tracking issue as a continuation to gh-6166

  • add copy-on-overlap to nditer, as optional flag gh-8043
  • use it for ufuncs gh-8043
  • check whether copy-on-overlap is respected in indexed assignment
  • respect it for dot() gh-8539
  • check other places in numpy that may need checking

Some initial code, https://github.com/numpy/numpy/compare/master...pv:copy-overlap

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
ahaldanecommented, Mar 23, 2019

These seem OK:

  • copyto is OK since it goes through PyArray_AssignArray, which has an overlap check.
  • _ureduce code (eg, median/percentile) looks OK since it is pure python and delegates to ufuncs
  • around is ok because it delegates to ufuncs

Problematic:

  • np.take There is no overlap detection. Demonstration: np.take(x, [1,2,3], out=x[2:5], mode='wrap') -> array([1., 1., 1.]).
  • np.choose no overlap detection. Demonstration: np.choose([0,0,0], [x[:3], x[:3], x[:3]], out=x[1:4], mode='wrap') -> array([1, 1, 1])
  • I didn’t carefully check, but I expect put and others in that file are the same.

Note that for both of these, with mode='raise', which is the default, a copy of out is always made to avoid clobbering out if an error occurs during processing, so there will be no risk of overlap. (incidentally, this seems unexpectedly inefficient for most people!).

So if we think those last ones should be fixed, we should keep this open.

1reaction
ahaldanecommented, Mar 23, 2019

Reviewing this as part of my 10 random issues, as requested in a 3/20/19 request.

I am 95% sure this is done and just forgotten to be closed, because in 2019 I have seen these overlap checks in the assignment code, including in code involving assignment to slices of an array.

I’m going to go ahead and close this, please reopen if that’s wrong.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Overlap - aescripts + aeplugins
Create dynamic overlapping action and follow-through for almost any property in your layers or shapes. ... Auto-Orient your Driver and Driven layers/shapes ...
Read more >
Are Overlap and Included Times Part of Estimating System ...
You provide them a copy of your assessment/supplement, hand them the vehicle's keys and have them either escorted or directed to the subject...
Read more >
Overlapping captions with auto-generated subtitles : r/youtubedl
I've tested downloading subtitles for a couple of different videos and each time I download an auto-generated file, I get a VTT file...
Read more >
Running Auxiliary Copy overlaps with Primary schedule
It is possible to adjust the behavior of the Aux copies so they do not automatically add new jobs to copy to the...
Read more >
NetSuite Applications Suite - Operations Overlap
Understanding Form Layout Enhancement Upgrade Logic ... Overlapping of manufacturing operations can reduce work order lead times and allow more efficient ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found