Skip to content

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

@changjian-github

Description

@changjian-github
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions