Skip to content

Commit 77de753

Browse files
authored
Merge pull request #594 from SciSharp/ilkernel
Release v0.41.0-prerelease: IL Kernel Generator
2 parents c7fb96d + 88fdcaf commit 77de753

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/NumSharp.Core/Backends/Default/Math/Default.ClipNDArray.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ public override NDArray ClipNDArray(NDArray lhs, NDArray min, NDArray max, NPTyp
5656
NumSharpException.ThrowIfNotWriteable(@out.Shape);
5757
if (@out.Shape != lhs.Shape)
5858
throw new ArgumentException($"@out's shape ({@out.Shape}) must match lhs's shape ({lhs.Shape}).'");
59+
// Copy input data into @out - user-provided @out may contain garbage (e.g., np.empty)
60+
np.copyto(@out, lhs);
5961
}
6062

6163
var len = @out.size;

0 commit comments

Comments
 (0)