Пример #1
0
        /// <summary>
        ///   Gets a lazily-instantiated array that can be used to load
        ///   matrices of the specified type from a stream.
        /// </summary>
        ///
        /// <typeparam name="T">The type to be loaded from the npy-formatted file.</typeparam>
        /// <param name="stream">The stream containing the matrix to be loaded.</param>
        /// <param name="value">The object to be read. This parameter can be used to avoid the
        ///   need of specifying a generic argument to this function.</param>
        ///
        /// <returns>The array to be returned.</returns>
        ///
        public static NpzDictionary <T> Load <T>(Stream stream, out NpzDictionary <T> value)
            where T : class,
#if !NETSTANDARD1_4
        ICloneable,
#endif
        IList, ICollection, IEnumerable, IStructuralComparable, IStructuralEquatable
        {
            return(value = Load <T>(stream));
        }
Пример #2
0
        /// <summary>
        ///   Gets a lazily-instantiated array that can be used to load
        ///   matrices of the specified type from a file in the disk.
        /// </summary>
        ///
        /// <typeparam name="T">The type to be loaded from the npy-formatted file.</typeparam>
        /// <param name="path">The path to the file containing the matrix to be loaded.</param>
        /// <param name="value">The object to be read. This parameter can be used to avoid the
        ///   need of specifying a generic argument to this function.</param>
        ///
        /// <returns>The array to be returned.</returns>
        ///
        public static NpzDictionary <T> Load <T>(string path, out NpzDictionary <T> value)
            where T : class,
#if !NETSTANDARD1_4
        ICloneable,
#endif
        IList, ICollection, IEnumerable, IStructuralComparable, IStructuralEquatable
        {
            return(value = Load <T>(new FileStream(path, FileMode.Open)));
        }