Skip to content

Commit 1d28c21

Browse files
SDSS MeetingSDSS Meeting
authored andcommitted
set flag copy=False in some calls to numpy.array() in ImUtil.py and Centroid.py
1 parent 8ee3c86 commit 1d28c21

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

python/Centroid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,4 +664,4 @@ def conditionArr(arr, desType):
664664
665665
Warning: does not copy the data unless necessary.
666666
"""
667-
return numpy.array(arr, dtype=desType, order="C")
667+
return numpy.array(arr, dtype=desType, order="C", copy=False)

python/ImUtil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def __init__(
187187
desBegInd,
188188
desEndInd,
189189
):
190-
self.dataArr = numpy.array(dataArr)
190+
self.dataArr = numpy.array(dataArr, copy=False)
191191
#print("SubFrame(data%s, desBegInd=%s, desEndInd=%s)" % (self.dataArr.shape, desBegInd, desEndInd))
192192

193193
# round desired i,j index (just in case)

0 commit comments

Comments
 (0)