Skip to content

Commit 9e62291

Browse files
committed
set shape as int[0] when string is empty.
1 parent 088103a commit 9e62291

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/NumSharp.Core/Creation/np.array.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public static NDArray array(string chars)
5959
{
6060
if (chars == null)
6161
throw new ArgumentNullException(nameof(chars));
62-
if (chars.Length==0)
63-
return new NDArray(NPTypeCode.Char);
62+
if (chars.Length == 0)
63+
return new NDArray(NPTypeCode.Char, 0);
6464

6565
unsafe
6666
{

0 commit comments

Comments
 (0)