Skip to content

Commit 1bacf33

Browse files
committed
np.ravel: Fixed case when ndarray is broadcasted
1 parent a001c47 commit 1bacf33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NumSharp.Core/Manipulation/np.ravel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static NDArray ravel(NDArray a)
1414
{
1515
//TODO! when slice reshaping is done, prevent this cloning.
1616
// ReSharper disable once ConvertIfStatementToReturnStatement
17-
if (a.Shape.IsSliced)
17+
if (!a.Shape.IsContiguous)
1818
return new NDArray(new UnmanagedStorage(a.Storage.CloneData(), Shape.Vector(a.size)));
1919

2020
return a.reshape(Shape.Vector(a.size));

0 commit comments

Comments
 (0)