Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linspace to Array as type float, while other functions as type double #487

Open
changjian-github opened this issue Feb 13, 2023 · 0 comments

Comments

@changjian-github
Copy link

changjian-github commented Feb 13, 2023

using NumSharp;

class Program
{
  static void Main(string[] args)
  {
    double[] x = np.arange(-1, 1.1, 0.1).ToArray<double>();
    float[] y = np.linspace(-1, 1, 21).ToArray<float>();
    double[] z = np.random.rand(21).ToArray<double>();
    Console.WriteLine("compile passed");
  }
}

Changing float to double will result in an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant