internal void FillWithScalar(object scalar) { if (Dtype.IsObject) { NpyCoreApi.FillWithObject(this, scalar); } else { ndarray zero_d_array = np.FromAny(scalar, Dtype, flags: NPYARRAYFLAGS.NPY_ALIGNED); NpyCoreApi.FillWithScalar(this, zero_d_array); } }
internal static void FillObjects(ndarray arr, object o) { dtype d = arr.Dtype; if (d.IsObject) { if (d.HasNames) { foreach (string name in d.Names) { ndarray view = NpyCoreApi.GetField(arr, name); FillObjects(view, o); } } else { NpyCoreApi.FillWithObject(arr, o); } } }