Closed forstater closed 8 years ago
I prefer a more direct if clause to improve readability:
if (np.array(self.mdBlockDepth)<0).all() or (np.array(self.mdBlockDepth)>1).all():
self.rejectEvent('eInvalidBlockDepth')
Agreed, That does improve the readability. In that case, I’d suggest the other double negative tests be replaced as well.
From: abalijepalli notifications@github.com Reply-To: usnistgov/mosaic reply@reply.github.com Date: Monday, May 23, 2016 at 10:54 AM To: usnistgov/mosaic mosaic@noreply.github.com Cc: "Forstater, Jacob H." jacob.forstater@nist.gov, Author author@noreply.github.com Subject: Re: [usnistgov/mosaic] Added criterion to reject BD outside (0,1) into general adept algo. (#79)
I prefer a more direct if clause to improve readability: if (np.array(self.mdBlockDepth)<0).all() or (np.array(self.mdBlockDepth)>1).all(): self.rejectEvent('eInvalidBlockDepth')
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHubhttps://github.com/usnistgov/mosaic/pull/79#issuecomment-221003432
I've reformulated the error checks in the affirmative.
Implemented test to reject unphysical blockade depths in adept algo. This test is already present in adept2state
Resolves issue: #79