Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Oceania2018/NumSharp
Browse files Browse the repository at this point in the history
  • Loading branch information
Oceania2018 committed Jan 29, 2019
2 parents d9d78e3 + 4d8b5bd commit 4b1724a
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ namespace NumSharp.Core
{
public partial class NDArray
{
public static implicit operator string(NDArray nd)
{
if (nd.ndim > 0)
throw new IncorrectShapeException();

return nd.Data<string>(0);
}

public static implicit operator NDArray(float d)
{
var ndArray = new NDArray(typeof(float), new int[0]);
Expand Down

0 comments on commit 4b1724a

Please sign in to comment.