Skip to content

Commit

Permalink
Merge pull request #24 from LSSTDESC/issue/21/emptycheck
Browse files Browse the repository at this point in the history
Switch equality check to size check for empty array, addresses #23
  • Loading branch information
hangqianjun authored Jan 17, 2025
2 parents 0b62771 + d988fa8 commit 2a478c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rail/estimation/algos/_gpz_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,9 @@ def GPz(self,theta, X, Y, omega=None, training=None, validation=None,returnModel

lnBeta = lnBeta+log(omega[training,:])

if Y==[]:
# if Y==[]: # NOTE: checking empty array now deprecated, switch to checking size!
# change made Jan 17, 2025 to fix a failure
if size(Y) == 0:
return PHI,lnBeta

g_dim = len(GAMMA.flatten())
Expand Down

0 comments on commit 2a478c9

Please sign in to comment.