Skip to content

Commit

Permalink
BUG: change overwrite default to False in qr update routines
Browse files Browse the repository at this point in the history
  • Loading branch information
ewmoore committed Apr 6, 2015
1 parent 307b4f3 commit b4c313b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scipy/linalg/_decomp_update.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1552,7 +1552,7 @@ cdef void* extract(cnp.ndarray arr, int* arrs):
return cnp.PyArray_DATA(arr)

@cython.embedsignature(True)
def qr_delete(Q, R, k, p=1, which='row', overwrite_qr=True, check_finite=True):
def qr_delete(Q, R, k, p=1, which='row', overwrite_qr=False, check_finite=True):
"""QR downdate on row or column deletions
If ``A = Q R`` is the QR factorization of ``A``, return the QR
Expand All @@ -1574,7 +1574,7 @@ def qr_delete(Q, R, k, p=1, which='row', overwrite_qr=True, check_finite=True):
overwrite_qr : bool, optional
If True, consume Q and R, overwriting their contents with their
downdated versions, and returning approriately sized views.
Defaults to True.
Defaults to False.
check_finite : bool, optional
Whether to check that the input matrix contains only finite numbers.
Disabling may give a performance gain, but may result in problems
Expand Down Expand Up @@ -1776,7 +1776,7 @@ def qr_delete(Q, R, k, p=1, which='row', overwrite_qr=True, check_finite=True):
raise ValueError("'which' must be either 'row' or 'col'")

@cython.embedsignature(True)
def qr_insert(Q, R, u, k, which='row', rcond=None, overwrite_qru=True, check_finite=True):
def qr_insert(Q, R, u, k, which='row', rcond=None, overwrite_qru=False, check_finite=True):
"""QR update on row or column insertions
If ``A = Q R`` is the QR factorization of ``A``, return the QR
Expand All @@ -1802,7 +1802,7 @@ def qr_insert(Q, R, u, k, which='row', rcond=None, overwrite_qru=True, check_fin
None.
overwrite_qru : bool, optional
If True, consume Q, R, and u, if possible, while performing the update,
otherwise make copies as necessary. Defaults to True.
otherwise make copies as necessary. Defaults to False.
check_finite : bool, optional
Whether to check that the input matrices contain only finite numbers.
Disabling may give a performance gain, but may result in problems
Expand Down Expand Up @@ -2118,7 +2118,7 @@ def qr_insert_col(Q, R, u, k, rcond, overwrite_qru, check_finite):
else:
frc = rcond
elif rcond is not None:
raise ValueError("'rcond' is not used when updated full, (M,M) (M,N) "
raise ValueError("'rcond' is not used when updating full, (M,M) (M,N) "
"decompositions and must be None.")

if economic:
Expand Down Expand Up @@ -2227,7 +2227,7 @@ def qr_insert_col(Q, R, u, k, rcond, overwrite_qru, check_finite):
return q1, rnew

@cython.embedsignature(True)
def qr_update(Q, R, u, v, overwrite_qruv=True, check_finite=True):
def qr_update(Q, R, u, v, overwrite_qruv=False, check_finite=True):
"""Rank-k QR update
If ``A = Q R`` is the QR factorization of ``A``, return the QR
Expand All @@ -2246,7 +2246,7 @@ def qr_update(Q, R, u, v, overwrite_qruv=True, check_finite=True):
Right update vector
overwrite_qruv : bool, optional
If True, consume Q, R, u, and v, if possible, while performing the
update, otherwise make copies as necessary. Defaults to True.
update, otherwise make copies as necessary. Defaults to False.
check_finite : bool, optional
Whether to check that the input matrix contains only finite numbers.
Disabling may give a performance gain, but may result in problems
Expand Down

0 comments on commit b4c313b

Please sign in to comment.