File: leanpass/tensor.py
The Tensor.log method computes np.log(self.data) without checking that self.data is strictly positive. Passing zeros or negative values yields -inf or nan and propagates silently, which is numerically unstable and deviates from typical autodiff libraries that raise a domain error. Add a guard that raises a ValueError for non‑positive inputs.
Filed automatically by ai-issue-scan.
File:
leanpass/tensor.pyThe
Tensor.logmethod computesnp.log(self.data)without checking thatself.datais strictly positive. Passing zeros or negative values yields-infornanand propagates silently, which is numerically unstable and deviates from typical autodiff libraries that raise a domain error. Add a guard that raises aValueErrorfor non‑positive inputs.Filed automatically by ai-issue-scan.