// Copyright (c) 2019 by the SciSharp Team
// Code generated by CodeMinion: https://github.com/SciSharp/CodeMinion
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using Python.Runtime;
using Numpy.Models;
using Python.Included;
namespace Numpy
{
public partial class NumPy
{
///
/// Return a new array of given shape and type, without initializing entries.
///
/// Notes
///
/// empty, unlike zeros, does not set the array values to zero,
/// and may therefore be marginally faster.
/// On the other hand, it requires
/// the user to manually set all the values in the array, and should be
/// used with caution.
///
///
/// Shape of the empty array, e.g., (2, 3) or 2.
///
///
/// Desired output data-type for the array, e.g, numpy.int8. Default is
/// numpy.float64.
///
///
/// Whether to store multi-dimensional data in row-major
/// (C-style) or column-major (Fortran-style) order in
/// memory.
///
///
/// Array of uninitialized (arbitrary) data of the given shape, dtype, and
/// order.
/// Object arrays will be initialized to None.
///
public NDarray empty(Shape shape, Dtype dtype = null, string order = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
shape,
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
dynamic py = __self__.InvokeMethod("empty", pyargs, kwargs);
return ToCsharp(py);
}
///
/// Return a new array with the same shape and type as a given array.
///
/// Notes
///
/// This function does not initialize the returned array; to do that use
/// zeros_like or ones_like instead.
/// It may be marginally faster than
/// the functions that do set the array values.
///
///
/// The shape and data-type of prototype define these same attributes
/// of the returned array.
///
///
/// Overrides the data type of the result.
///
///
/// Overrides the memory layout of the result.
/// ‘C’ means C-order,
/// ‘F’ means F-order, ‘A’ means ‘F’ if prototype is Fortran
/// contiguous, ‘C’ otherwise.
/// ‘K’ means match the layout of prototype
/// as closely as possible.
///
///
/// If True, then the newly created array will use the sub-class
/// type of ‘a’, otherwise it will be a base-class array.
/// Defaults
/// to True.
///
///
/// Array of uninitialized (arbitrary) data with the same
/// shape and type as prototype.
///
public NDarray empty_like(NDarray prototype, Dtype dtype = null, string order = null, bool? subok = true)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
prototype,
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
if (subok!=true) kwargs["subok"]=ToPython(subok);
dynamic py = __self__.InvokeMethod("empty_like", pyargs, kwargs);
return ToCsharp(py);
}
///
/// Return a new array with the same shape and type as a given array.
///
/// Notes
///
/// This function does not initialize the returned array; to do that use
/// zeros_like or ones_like instead.
/// It may be marginally faster than
/// the functions that do set the array values.
///
///
/// The shape and data-type of prototype define these same attributes
/// of the returned array.
///
///
/// Overrides the data type of the result.
///
///
/// Overrides the memory layout of the result.
/// ‘C’ means C-order,
/// ‘F’ means F-order, ‘A’ means ‘F’ if prototype is Fortran
/// contiguous, ‘C’ otherwise.
/// ‘K’ means match the layout of prototype
/// as closely as possible.
///
///
/// If True, then the newly created array will use the sub-class
/// type of ‘a’, otherwise it will be a base-class array.
/// Defaults
/// to True.
///
///
/// Array of uninitialized (arbitrary) data with the same
/// shape and type as prototype.
///
public NDarray empty_like(T[] prototype, Dtype dtype = null, string order = null, bool? subok = true)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(prototype),
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
if (subok!=true) kwargs["subok"]=ToPython(subok);
dynamic py = __self__.InvokeMethod("empty_like", pyargs, kwargs);
return ToCsharp>(py);
}
///
/// Return a new array with the same shape and type as a given array.
///
/// Notes
///
/// This function does not initialize the returned array; to do that use
/// zeros_like or ones_like instead.
/// It may be marginally faster than
/// the functions that do set the array values.
///
///
/// The shape and data-type of prototype define these same attributes
/// of the returned array.
///
///
/// Overrides the data type of the result.
///
///
/// Overrides the memory layout of the result.
/// ‘C’ means C-order,
/// ‘F’ means F-order, ‘A’ means ‘F’ if prototype is Fortran
/// contiguous, ‘C’ otherwise.
/// ‘K’ means match the layout of prototype
/// as closely as possible.
///
///
/// If True, then the newly created array will use the sub-class
/// type of ‘a’, otherwise it will be a base-class array.
/// Defaults
/// to True.
///
///
/// Array of uninitialized (arbitrary) data with the same
/// shape and type as prototype.
///
public NDarray empty_like(T[,] prototype, Dtype dtype = null, string order = null, bool? subok = true)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(prototype),
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
if (subok!=true) kwargs["subok"]=ToPython(subok);
dynamic py = __self__.InvokeMethod("empty_like", pyargs, kwargs);
return ToCsharp>(py);
}
///
/// Return a 2-D array with ones on the diagonal and zeros elsewhere.
///
///
/// Number of rows in the output.
///
///
/// Number of columns in the output.
/// If None, defaults to N.
///
///
/// Index of the diagonal: 0 (the default) refers to the main diagonal,
/// a positive value refers to an upper diagonal, and a negative value
/// to a lower diagonal.
///
///
/// Data-type of the returned array.
///
///
/// Whether the output should be stored in row-major (C-style) or
/// column-major (Fortran-style) order in memory.
///
///
/// An array where all elements are equal to zero, except for the k-th
/// diagonal, whose values are equal to one.
///
public NDarray eye(int N, int? M = null, int? k = 0, Dtype dtype = null, string order = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
N,
});
var kwargs=new PyDict();
if (M!=null) kwargs["M"]=ToPython(M);
if (k!=0) kwargs["k"]=ToPython(k);
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
dynamic py = __self__.InvokeMethod("eye", pyargs, kwargs);
return ToCsharp(py);
}
///
/// Return the identity array.
///
/// The identity array is a square array with ones on
/// the main diagonal.
///
///
/// Number of rows (and columns) in n x n output.
///
///
/// Data-type of the output.
/// Defaults to float.
///
///
/// n x n array with its main diagonal set to one,
/// and all other elements 0.
///
public NDarray identity(int n, Dtype dtype = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
n,
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
dynamic py = __self__.InvokeMethod("identity", pyargs, kwargs);
return ToCsharp(py);
}
///
/// Return a new array of given shape and type, filled with ones.
///
///
/// Shape of the new array, e.g., (2, 3) or 2.
///
///
/// The desired data-type for the array, e.g., numpy.int8. Default is
/// numpy.float64.
///
///
/// Whether to store multi-dimensional data in row-major
/// (C-style) or column-major (Fortran-style) order in
/// memory.
///
///
/// Array of ones with the given shape, dtype, and order.
///
public NDarray ones(Shape shape, Dtype dtype = null, string order = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
shape,
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
dynamic py = __self__.InvokeMethod("ones", pyargs, kwargs);
return ToCsharp(py);
}
///
/// Return an array of ones with the same shape and type as a given array.
///
///
/// The shape and data-type of a define these same attributes of
/// the returned array.
///
///
/// Overrides the data type of the result.
///
///
/// Overrides the memory layout of the result.
/// ‘C’ means C-order,
/// ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous,
/// ‘C’ otherwise.
/// ‘K’ means match the layout of a as closely
/// as possible.
///
///
/// If True, then the newly created array will use the sub-class
/// type of ‘a’, otherwise it will be a base-class array.
/// Defaults
/// to True.
///
///
/// Array of ones with the same shape and type as a.
///
public NDarray ones_like(NDarray a, Dtype dtype = null, string order = null, bool? subok = true)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
a,
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
if (subok!=true) kwargs["subok"]=ToPython(subok);
dynamic py = __self__.InvokeMethod("ones_like", pyargs, kwargs);
return ToCsharp(py);
}
///
/// Return an array of ones with the same shape and type as a given array.
///
///
/// The shape and data-type of a define these same attributes of
/// the returned array.
///
///
/// Overrides the data type of the result.
///
///
/// Overrides the memory layout of the result.
/// ‘C’ means C-order,
/// ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous,
/// ‘C’ otherwise.
/// ‘K’ means match the layout of a as closely
/// as possible.
///
///
/// If True, then the newly created array will use the sub-class
/// type of ‘a’, otherwise it will be a base-class array.
/// Defaults
/// to True.
///
///
/// Array of ones with the same shape and type as a.
///
public NDarray ones_like(T[] a, Dtype dtype = null, string order = null, bool? subok = true)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(a),
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
if (subok!=true) kwargs["subok"]=ToPython(subok);
dynamic py = __self__.InvokeMethod("ones_like", pyargs, kwargs);
return ToCsharp>(py);
}
///
/// Return an array of ones with the same shape and type as a given array.
///
///
/// The shape and data-type of a define these same attributes of
/// the returned array.
///
///
/// Overrides the data type of the result.
///
///
/// Overrides the memory layout of the result.
/// ‘C’ means C-order,
/// ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous,
/// ‘C’ otherwise.
/// ‘K’ means match the layout of a as closely
/// as possible.
///
///
/// If True, then the newly created array will use the sub-class
/// type of ‘a’, otherwise it will be a base-class array.
/// Defaults
/// to True.
///
///
/// Array of ones with the same shape and type as a.
///
public NDarray ones_like(T[,] a, Dtype dtype = null, string order = null, bool? subok = true)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(a),
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
if (subok!=true) kwargs["subok"]=ToPython(subok);
dynamic py = __self__.InvokeMethod("ones_like", pyargs, kwargs);
return ToCsharp>(py);
}
///
/// Return a new array of given shape and type, filled with zeros.
///
///
/// Shape of the new array, e.g., (2, 3) or 2.
///
///
/// The desired data-type for the array, e.g., numpy.int8. Default is
/// numpy.float64.
///
///
/// Whether to store multi-dimensional data in row-major
/// (C-style) or column-major (Fortran-style) order in
/// memory.
///
///
/// Array of zeros with the given shape, dtype, and order.
///
public NDarray zeros(Shape shape, Dtype dtype = null, string order = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
shape,
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
dynamic py = __self__.InvokeMethod("zeros", pyargs, kwargs);
return ToCsharp(py);
}
///
/// Return an array of zeros with the same shape and type as a given array.
///
///
/// The shape and data-type of a define these same attributes of
/// the returned array.
///
///
/// Overrides the data type of the result.
///
///
/// Overrides the memory layout of the result.
/// ‘C’ means C-order,
/// ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous,
/// ‘C’ otherwise.
/// ‘K’ means match the layout of a as closely
/// as possible.
///
///
/// If True, then the newly created array will use the sub-class
/// type of ‘a’, otherwise it will be a base-class array.
/// Defaults
/// to True.
///
///
/// Array of zeros with the same shape and type as a.
///
public NDarray zeros_like(NDarray a, Dtype dtype = null, string order = null, bool? subok = true)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
a,
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
if (subok!=true) kwargs["subok"]=ToPython(subok);
dynamic py = __self__.InvokeMethod("zeros_like", pyargs, kwargs);
return ToCsharp(py);
}
///
/// Return an array of zeros with the same shape and type as a given array.
///
///
/// The shape and data-type of a define these same attributes of
/// the returned array.
///
///
/// Overrides the data type of the result.
///
///
/// Overrides the memory layout of the result.
/// ‘C’ means C-order,
/// ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous,
/// ‘C’ otherwise.
/// ‘K’ means match the layout of a as closely
/// as possible.
///
///
/// If True, then the newly created array will use the sub-class
/// type of ‘a’, otherwise it will be a base-class array.
/// Defaults
/// to True.
///
///
/// Array of zeros with the same shape and type as a.
///
public NDarray zeros_like(T[] a, Dtype dtype = null, string order = null, bool? subok = true)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(a),
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
if (subok!=true) kwargs["subok"]=ToPython(subok);
dynamic py = __self__.InvokeMethod("zeros_like", pyargs, kwargs);
return ToCsharp>(py);
}
///
/// Return an array of zeros with the same shape and type as a given array.
///
///
/// The shape and data-type of a define these same attributes of
/// the returned array.
///
///
/// Overrides the data type of the result.
///
///
/// Overrides the memory layout of the result.
/// ‘C’ means C-order,
/// ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous,
/// ‘C’ otherwise.
/// ‘K’ means match the layout of a as closely
/// as possible.
///
///
/// If True, then the newly created array will use the sub-class
/// type of ‘a’, otherwise it will be a base-class array.
/// Defaults
/// to True.
///
///
/// Array of zeros with the same shape and type as a.
///
public NDarray zeros_like(T[,] a, Dtype dtype = null, string order = null, bool? subok = true)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(a),
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
if (subok!=true) kwargs["subok"]=ToPython(subok);
dynamic py = __self__.InvokeMethod("zeros_like", pyargs, kwargs);
return ToCsharp>(py);
}
///
/// Return a new array of given shape and type, filled with fill_value.
///
///
/// Shape of the new array, e.g., (2, 3) or 2.
///
///
/// Fill value.
///
///
/// Whether to store multidimensional data in C- or Fortran-contiguous
/// (row- or column-wise) order in memory.
///
///
/// Array of fill_value with the given shape, dtype, and order.
///
public NDarray full(Shape shape, ValueType fill_value, Dtype dtype = null, string order = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
shape,
fill_value,
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
dynamic py = __self__.InvokeMethod("full", pyargs, kwargs);
return ToCsharp(py);
}
///
/// Return a full array with the same shape and type as a given array.
///
///
/// The shape and data-type of a define these same attributes of
/// the returned array.
///
///
/// Fill value.
///
///
/// Overrides the data type of the result.
///
///
/// Overrides the memory layout of the result.
/// ‘C’ means C-order,
/// ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous,
/// ‘C’ otherwise.
/// ‘K’ means match the layout of a as closely
/// as possible.
///
///
/// If True, then the newly created array will use the sub-class
/// type of ‘a’, otherwise it will be a base-class array.
/// Defaults
/// to True.
///
///
/// Array of fill_value with the same shape and type as a.
///
public NDarray full_like(NDarray a, ValueType fill_value, Dtype dtype = null, string order = null, bool? subok = true)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
a,
fill_value,
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
if (subok!=true) kwargs["subok"]=ToPython(subok);
dynamic py = __self__.InvokeMethod("full_like", pyargs, kwargs);
return ToCsharp(py);
}
///
/// Return a full array with the same shape and type as a given array.
///
///
/// The shape and data-type of a define these same attributes of
/// the returned array.
///
///
/// Fill value.
///
///
/// Overrides the data type of the result.
///
///
/// Overrides the memory layout of the result.
/// ‘C’ means C-order,
/// ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous,
/// ‘C’ otherwise.
/// ‘K’ means match the layout of a as closely
/// as possible.
///
///
/// If True, then the newly created array will use the sub-class
/// type of ‘a’, otherwise it will be a base-class array.
/// Defaults
/// to True.
///
///
/// Array of fill_value with the same shape and type as a.
///
public NDarray full_like(T[] a, ValueType fill_value, Dtype dtype = null, string order = null, bool? subok = true)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(a),
fill_value,
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
if (subok!=true) kwargs["subok"]=ToPython(subok);
dynamic py = __self__.InvokeMethod("full_like", pyargs, kwargs);
return ToCsharp>(py);
}
///
/// Return a full array with the same shape and type as a given array.
///
///
/// The shape and data-type of a define these same attributes of
/// the returned array.
///
///
/// Fill value.
///
///
/// Overrides the data type of the result.
///
///
/// Overrides the memory layout of the result.
/// ‘C’ means C-order,
/// ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous,
/// ‘C’ otherwise.
/// ‘K’ means match the layout of a as closely
/// as possible.
///
///
/// If True, then the newly created array will use the sub-class
/// type of ‘a’, otherwise it will be a base-class array.
/// Defaults
/// to True.
///
///
/// Array of fill_value with the same shape and type as a.
///
public NDarray full_like(T[,] a, ValueType fill_value, Dtype dtype = null, string order = null, bool? subok = true)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(a),
fill_value,
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
if (subok!=true) kwargs["subok"]=ToPython(subok);
dynamic py = __self__.InvokeMethod("full_like", pyargs, kwargs);
return ToCsharp>(py);
}
///
/// Convert the input to an array.
///
///
/// Input data, in any form that can be converted to an array.
/// This
/// includes lists, lists of tuples, tuples, tuples of tuples, tuples
/// of lists and ndarrays.
///
///
/// By default, the data-type is inferred from the input data.
///
///
/// Whether to use row-major (C-style) or
/// column-major (Fortran-style) memory representation.
///
/// Defaults to ‘C’.
///
///
/// Array interpretation of a.
/// No copy is performed if the input
/// is already an ndarray with matching dtype and order.
/// If a is a
/// subclass of ndarray, a base class ndarray is returned.
///
public NDarray asarray(NDarray a, Dtype dtype = null, string order = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
a,
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
dynamic py = __self__.InvokeMethod("asarray", pyargs, kwargs);
return ToCsharp(py);
}
///
/// Convert the input to an array.
///
///
/// Input data, in any form that can be converted to an array.
/// This
/// includes lists, lists of tuples, tuples, tuples of tuples, tuples
/// of lists and ndarrays.
///
///
/// By default, the data-type is inferred from the input data.
///
///
/// Whether to use row-major (C-style) or
/// column-major (Fortran-style) memory representation.
///
/// Defaults to ‘C’.
///
///
/// Array interpretation of a.
/// No copy is performed if the input
/// is already an ndarray with matching dtype and order.
/// If a is a
/// subclass of ndarray, a base class ndarray is returned.
///
public NDarray asarray(T[] a, Dtype dtype = null, string order = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(a),
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
dynamic py = __self__.InvokeMethod("asarray", pyargs, kwargs);
return ToCsharp>(py);
}
///
/// Convert the input to an array.
///
///
/// Input data, in any form that can be converted to an array.
/// This
/// includes lists, lists of tuples, tuples, tuples of tuples, tuples
/// of lists and ndarrays.
///
///
/// By default, the data-type is inferred from the input data.
///
///
/// Whether to use row-major (C-style) or
/// column-major (Fortran-style) memory representation.
///
/// Defaults to ‘C’.
///
///
/// Array interpretation of a.
/// No copy is performed if the input
/// is already an ndarray with matching dtype and order.
/// If a is a
/// subclass of ndarray, a base class ndarray is returned.
///
public NDarray asarray(T[,] a, Dtype dtype = null, string order = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(a),
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
dynamic py = __self__.InvokeMethod("asarray", pyargs, kwargs);
return ToCsharp>(py);
}
///
/// Convert the input to an ndarray, but pass ndarray subclasses through.
///
///
/// Input data, in any form that can be converted to an array.
/// This
/// includes scalars, lists, lists of tuples, tuples, tuples of tuples,
/// tuples of lists, and ndarrays.
///
///
/// By default, the data-type is inferred from the input data.
///
///
/// Whether to use row-major (C-style) or column-major
/// (Fortran-style) memory representation.
/// Defaults to ‘C’.
///
///
/// Array interpretation of a.
/// If a is an ndarray or a subclass
/// of ndarray, it is returned as-is and no copy is performed.
///
public NDarray asanyarray(NDarray a, Dtype dtype = null, string order = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
a,
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
dynamic py = __self__.InvokeMethod("asanyarray", pyargs, kwargs);
return ToCsharp(py);
}
///
/// Convert the input to an ndarray, but pass ndarray subclasses through.
///
///
/// Input data, in any form that can be converted to an array.
/// This
/// includes scalars, lists, lists of tuples, tuples, tuples of tuples,
/// tuples of lists, and ndarrays.
///
///
/// By default, the data-type is inferred from the input data.
///
///
/// Whether to use row-major (C-style) or column-major
/// (Fortran-style) memory representation.
/// Defaults to ‘C’.
///
///
/// Array interpretation of a.
/// If a is an ndarray or a subclass
/// of ndarray, it is returned as-is and no copy is performed.
///
public NDarray asanyarray(T[] a, Dtype dtype = null, string order = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(a),
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
dynamic py = __self__.InvokeMethod("asanyarray", pyargs, kwargs);
return ToCsharp>(py);
}
///
/// Convert the input to an ndarray, but pass ndarray subclasses through.
///
///
/// Input data, in any form that can be converted to an array.
/// This
/// includes scalars, lists, lists of tuples, tuples, tuples of tuples,
/// tuples of lists, and ndarrays.
///
///
/// By default, the data-type is inferred from the input data.
///
///
/// Whether to use row-major (C-style) or column-major
/// (Fortran-style) memory representation.
/// Defaults to ‘C’.
///
///
/// Array interpretation of a.
/// If a is an ndarray or a subclass
/// of ndarray, it is returned as-is and no copy is performed.
///
public NDarray asanyarray(T[,] a, Dtype dtype = null, string order = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(a),
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (order!=null) kwargs["order"]=ToPython(order);
dynamic py = __self__.InvokeMethod("asanyarray", pyargs, kwargs);
return ToCsharp>(py);
}
///
/// Return a contiguous array (ndim >= 1) in memory (C order).
///
///
/// Input array.
///
///
/// Data-type of returned array.
///
///
/// Contiguous array of same shape and content as a, with type dtype
/// if specified.
///
public NDarray ascontiguousarray(NDarray a, Dtype dtype = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
a,
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
dynamic py = __self__.InvokeMethod("ascontiguousarray", pyargs, kwargs);
return ToCsharp(py);
}
///
/// Return a contiguous array (ndim >= 1) in memory (C order).
///
///
/// Input array.
///
///
/// Data-type of returned array.
///
///
/// Contiguous array of same shape and content as a, with type dtype
/// if specified.
///
public NDarray ascontiguousarray(T[] a, Dtype dtype = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(a),
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
dynamic py = __self__.InvokeMethod("ascontiguousarray", pyargs, kwargs);
return ToCsharp>(py);
}
///
/// Return a contiguous array (ndim >= 1) in memory (C order).
///
///
/// Input array.
///
///
/// Data-type of returned array.
///
///
/// Contiguous array of same shape and content as a, with type dtype
/// if specified.
///
public NDarray ascontiguousarray(T[,] a, Dtype dtype = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(a),
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
dynamic py = __self__.InvokeMethod("ascontiguousarray", pyargs, kwargs);
return ToCsharp>(py);
}
///
/// Interpret the input as a matrix.
///
/// Unlike matrix, asmatrix does not make a copy if the input is already
/// a matrix or an ndarray.
/// Equivalent to matrix(data, copy=False).
///
///
/// Input data.
///
///
/// Data-type of the output matrix.
///
///
/// data interpreted as a matrix.
///
public Matrix asmatrix(NDarray data, Dtype dtype)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
data,
dtype,
});
var kwargs=new PyDict();
dynamic py = __self__.InvokeMethod("asmatrix", pyargs, kwargs);
return ToCsharp(py);
}
///
/// Interpret the input as a matrix.
///
/// Unlike matrix, asmatrix does not make a copy if the input is already
/// a matrix or an ndarray.
/// Equivalent to matrix(data, copy=False).
///
///
/// Input data.
///
///
/// Data-type of the output matrix.
///
///
/// data interpreted as a matrix.
///
public Matrix asmatrix(T[] data, Dtype dtype)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(data),
dtype,
});
var kwargs=new PyDict();
dynamic py = __self__.InvokeMethod("asmatrix", pyargs, kwargs);
return ToCsharp(py);
}
///
/// Interpret the input as a matrix.
///
/// Unlike matrix, asmatrix does not make a copy if the input is already
/// a matrix or an ndarray.
/// Equivalent to matrix(data, copy=False).
///
///
/// Input data.
///
///
/// Data-type of the output matrix.
///
///
/// data interpreted as a matrix.
///
public Matrix asmatrix(T[,] data, Dtype dtype)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(data),
dtype,
});
var kwargs=new PyDict();
dynamic py = __self__.InvokeMethod("asmatrix", pyargs, kwargs);
return ToCsharp(py);
}
///
/// Return an array copy of the given object.
///
/// Notes
///
/// This is equivalent to:
///
///
/// Input data.
///
///
/// Controls the memory layout of the copy.
/// ‘C’ means C-order,
/// ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous,
/// ‘C’ otherwise.
/// ‘K’ means match the layout of a as closely
/// as possible.
/// (Note that this function and ndarray.copy are very
/// similar, but have different default values for their order=
/// arguments.)
///
///
/// Array interpretation of a.
///
public NDarray copy(NDarray a, string order = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
a,
});
var kwargs=new PyDict();
if (order!=null) kwargs["order"]=ToPython(order);
dynamic py = __self__.InvokeMethod("copy", pyargs, kwargs);
return ToCsharp(py);
}
///
/// Return an array copy of the given object.
///
/// Notes
///
/// This is equivalent to:
///
///
/// Input data.
///
///
/// Controls the memory layout of the copy.
/// ‘C’ means C-order,
/// ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous,
/// ‘C’ otherwise.
/// ‘K’ means match the layout of a as closely
/// as possible.
/// (Note that this function and ndarray.copy are very
/// similar, but have different default values for their order=
/// arguments.)
///
///
/// Array interpretation of a.
///
public NDarray copy(T[] a, string order = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(a),
});
var kwargs=new PyDict();
if (order!=null) kwargs["order"]=ToPython(order);
dynamic py = __self__.InvokeMethod("copy", pyargs, kwargs);
return ToCsharp>(py);
}
///
/// Return an array copy of the given object.
///
/// Notes
///
/// This is equivalent to:
///
///
/// Input data.
///
///
/// Controls the memory layout of the copy.
/// ‘C’ means C-order,
/// ‘F’ means F-order, ‘A’ means ‘F’ if a is Fortran contiguous,
/// ‘C’ otherwise.
/// ‘K’ means match the layout of a as closely
/// as possible.
/// (Note that this function and ndarray.copy are very
/// similar, but have different default values for their order=
/// arguments.)
///
///
/// Array interpretation of a.
///
public NDarray copy(T[,] a, string order = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
SharpToSharp(a),
});
var kwargs=new PyDict();
if (order!=null) kwargs["order"]=ToPython(order);
dynamic py = __self__.InvokeMethod("copy", pyargs, kwargs);
return ToCsharp>(py);
}
/*
///
/// Interpret a buffer as a 1-dimensional array.
///
/// Notes
///
/// If the buffer has data that is not in machine byte-order, this should
/// be specified as part of the data-type, e.g.:
///
/// The data of the resulting array will not be byteswapped, but will be
/// interpreted correctly.
///
///
/// An object that exposes the buffer interface.
///
///
/// Data-type of the returned array; default: float.
///
///
/// Number of items to read.
/// -1 means all data in the buffer.
///
///
/// Start reading the buffer from this offset (in bytes); default: 0.
///
public void frombuffer(buffer_like buffer, Dtype dtype = null, int? count = -1, int? offset = 0)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
buffer,
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (count!=-1) kwargs["count"]=ToPython(count);
if (offset!=0) kwargs["offset"]=ToPython(offset);
dynamic py = __self__.InvokeMethod("frombuffer", pyargs, kwargs);
}
*/
///
/// Construct an array from data in a text or binary file.
///
/// A highly efficient way of reading binary data with a known data-type,
/// as well as parsing simply formatted text files.
/// Data written using the
/// tofile method can be read using this function.
///
/// Notes
///
/// Do not rely on the combination of tofile and fromfile for
/// data storage, as the binary files generated are are not platform
/// independent.
/// In particular, no byte-order or data-type information is
/// saved.
/// Data can be stored in the platform independent .npy format
/// using save and load instead.
///
///
/// Open file object or filename.
///
///
/// Data type of the returned array.
///
/// For binary files, it is used to determine the size and byte-order
/// of the items in the file.
///
///
/// Number of items to read.
/// -1 means all items (i.e., the complete
/// file).
///
///
/// Separator between items if file is a text file.
///
/// Empty (“”) separator means the file should be treated as binary.
///
/// Spaces (” “) in the separator match zero or more whitespace characters.
///
/// A separator consisting only of spaces must match at least one
/// whitespace.
///
public void fromfile(string file, Dtype dtype = null, int count = -1, string sep = "")
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
file,
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
if (count!=-1) kwargs["count"]=ToPython(count);
if (sep!="") kwargs["sep"]=ToPython(sep);
dynamic py = __self__.InvokeMethod("fromfile", pyargs, kwargs);
}
///
/// Construct an array by executing a function over each coordinate.
///
/// The resulting array therefore has a value fn(x, y, z) at
/// coordinate (x, y, z).
///
/// Notes
///
/// Keywords other than dtype are passed to function.
///
///
/// The function is called with N parameters, where N is the rank of
/// shape.
/// Each parameter represents the coordinates of the array
/// varying along a specific axis.
/// For example, if shape
/// were (2, 2), then the parameters would be
/// array([[0, 0], [1, 1]]) and array([[0, 1], [0, 1]])
///
///
/// Shape of the output array, which also determines the shape of
/// the coordinate arrays passed to function.
///
///
/// Data-type of the coordinate arrays passed to function.
///
/// By default, dtype is float.
///
///
/// The result of the call to function is passed back directly.
///
/// Therefore the shape of fromfunction is completely determined by
/// function.
/// If function returns a scalar value, the shape of
/// fromfunction would not match the shape parameter.
///
public object fromfunction(Delegate function, Shape shape, Dtype dtype = null)
{
//auto-generated code, do not change
var __self__=self;
var pyargs=ToTuple(new object[]
{
function,
shape,
});
var kwargs=new PyDict();
if (dtype!=null) kwargs["dtype"]=ToPython(dtype);
dynamic py = __self__.InvokeMethod("fromfunction", pyargs, kwargs);
return ToCsharp