{"id":13484511,"url":"https://github.com/rbotafogo/mdarray","last_synced_at":"2025-06-16T16:04:42.013Z","repository":{"id":7719758,"uuid":"9085464","full_name":"rbotafogo/mdarray","owner":"rbotafogo","description":"Multidimensional array similar to NumPy and NArray","archived":false,"fork":false,"pushed_at":"2017-03-31T20:27:38.000Z","size":85372,"stargazers_count":36,"open_issues_count":3,"forks_count":6,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-31T22:35:24.298Z","etag":null,"topics":["colt","jruby","linear-algebra","matrix","mdarray","multidimensional-arrays","ruby","rubydatascience"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rbotafogo.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-28T20:13:04.000Z","updated_at":"2020-10-20T21:45:34.000Z","dependencies_parsed_at":"2022-09-11T07:20:51.428Z","dependency_job_id":null,"html_url":"https://github.com/rbotafogo/mdarray","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/rbotafogo/mdarray","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbotafogo%2Fmdarray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbotafogo%2Fmdarray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbotafogo%2Fmdarray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbotafogo%2Fmdarray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbotafogo","download_url":"https://codeload.github.com/rbotafogo/mdarray/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbotafogo%2Fmdarray/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260193893,"owners_count":22972618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["colt","jruby","linear-algebra","matrix","mdarray","multidimensional-arrays","ruby","rubydatascience"],"created_at":"2024-07-31T17:01:25.438Z","updated_at":"2025-06-16T16:04:41.961Z","avatar_url":"https://github.com/rbotafogo.png","language":"Ruby","readme":"Announcement\r\n============\r\n\r\nMDArray version 0.5.5.2 has been released. MDArray is a multi dimensional array implemented \r\nfor JRuby inspired by NumPy (www.numpy.org) and Masahiro Tanaka´s Narray (narray.rubyforge.org).  \r\nMDArray stands on the shoulders of Java-NetCDF and Parallel Colt.  At this point MDArray has \r\nlibraries for linear algebra, mathematical, trigonometric and descriptive statistics methods.\r\n\r\nNetCDF-Java Library is a Java interface to NetCDF files, as well as to many other types of \r\nscientific data formats.  It is developed and distributed by Unidata (http://www.unidata.ucar.edu).\r\n \r\nParallel Colt (https://sites.google.com/site/piotrwendykier/software/parallelcolt is a\r\n multithreaded version of Colt (http://acs.lbl.gov/software/colt/).  Colt provides a set of \r\nOpen Source Libraries for High Performance Scientific and Technical Computing in Java. \r\nScientific and technical computing is characterized by demanding problem sizes and a need for \r\nhigh performance at reasonably small memory footprint.\r\n\r\n\r\nWhat´s new:\r\n===========\r\n\r\nVersion 0.5.5.2 is a bug fix for a class StringArray.  In Java-NetCDF when passing \"string\" as type\r\nan ObjectArray is created and not a StringArray.  This version fix this issue and gets a\r\nStringArray when the \"string\" type is selected.\r\n\r\n\r\nMDArray and SciRuby:\r\n====================\r\n\r\nMDArray subscribes fully to the SciRuby Manifesto (http://sciruby.com/). \r\n\r\n“Ruby has for some time had no equivalent to the beautifully constructed NumPy, SciPy, and \r\nmatplotlib libraries for Python. \r\n\r\nWe believe that the time for a Ruby science and visualization package has come. Sometimes \r\nwhen a solution of sugar and water becomes super-saturated, from it precipitates a pure, \r\ndelicious, and diabetes-inducing crystal of sweetness, induced by no more than the tap of a \r\nfinger. So is occurring now, we believe, with numeric and visualization libraries for Ruby.”\r\n\r\nMDArray main properties are:\r\n============================\r\n\r\n + Homogeneous multidimensional array, a table of elements (usually numbers), all of the \r\n     same type, indexed by a tuple of positive integers;\r\n + Support for many linear algebra methods (see bellow);\r\n + Easy calculation for large numerical multi dimensional arrays;\r\n + Basic types are: boolean, byte, short, int, long, float, double, string, structure;\r\n + Based on JRuby, which allows importing Java libraries;\r\n + Operator: +,-,*,/,%,**, \u003e, \u003e=, etc.;\r\n + Functions: abs, ceil, floor, truncate, is_zero, square, cube, fourth;\r\n + Binary Operators: \u0026, |, ^, ~ (binary_ones_complement), \u003c\u003c, \u003e\u003e;\r\n + Ruby Math functions: acos, acosh, asin, asinh, atan, atan2, atanh, cbrt, cos, erf, exp, \r\n     gamma, hypot, ldexp, log, log10, log2, sin, sinh, sqrt, tan, tanh, neg;\r\n + Boolean operations on boolean arrays: and, or, not;\r\n + Fast descriptive statistics from Parallel Colt (complete list found bellow);\r\n + Easy manipulation of arrays: reshape, reduce dimension, permute, section, slice, etc.;\r\n + Support for reading and writing NetCDF-3 files;\r\n + Reading of two dimensional arrays from CSV files (mainly for debugging and simple testing \r\n     purposes);\r\n + StatList: a list that can grow/shrink and that can compute Parallel Colt descriptive \r\n     statistics;\r\n + Experimental lazy evaluation (still slower than eager evaluation).\r\n\r\nSupported linear algebra methods:\r\n=================================\r\n\r\n  + backwardSolve:  Solves the upper triangular system U*x=b;\r\n  + chol: Constructs and returns the cholesky-decomposition of the given matrix.\r\n  + cond: Returns the condition of matrix A, which is the ratio of largest to smallest singular value.\r\n  + det: Returns the determinant of matrix A.\r\n  + eig: Constructs and returns the Eigenvalue-decomposition of the given matrix.\r\n  + forwardSolve:  Solves the lower triangular system L*x=b;\r\n  + inverse: Returns the inverse or pseudo-inverse of matrix A.\r\n  + kron: Computes the Kronecker product of two real matrices.\r\n  + lu: Constructs and returns the LU-decomposition of the given matrix.\r\n  + mult: Inner product of two vectors; Sum(x[i] * y[i]).\r\n  + mult: Linear algebraic matrix-vector multiplication; z = A * y.\r\n  + mult: Linear algebraic matrix-matrix multiplication; C = A x B.\r\n  + multOuter: Outer product of two vectors; Sets A[i,j] = x[i] * y[j].\r\n  + norm1: Returns the one-norm of vector x, which is Sum(abs(x[i])).\r\n  + norm1: Returns the one-norm of matrix A, which is the maximum absolute column sum.\r\n  + norm2: Returns the two-norm (aka euclidean norm) of vector x; equivalent to Sqrt(mult(x,x)).\r\n  + norm2: Returns the two-norm of matrix A, which is the maximum singular value; obtained from SVD.\r\n  + normF: Returns the Frobenius norm of matrix A, which is Sqrt(Sum(A[i]2)).\r\n  + normF: Returns the Frobenius norm of matrix A, which is Sqrt(Sum(A[i,j]2)).\r\n  + normInfinity: Returns the infinity norm of vector x, which is Max(abs(x[i])).\r\n  + normInfinity: Returns the infinity norm of matrix A, which is the maximum absolute row sum.\r\n  + pow: Linear algebraic matrix power; B = Ak \u003c==\u003e B = A*A*...*A.\r\n  + qr: Constructs and returns the QR-decomposition of the given matrix.\r\n  + rank: Returns the effective numerical rank of matrix A, obtained from Singular Value Decomposition.\r\n  + solve: Solves A*x = b.\r\n  + solve: Solves A*X = B.\r\n  + solveTranspose: Solves X*A = B, which is also A'*X' = B'.\r\n  + svd: Constructs and returns the SingularValue-decomposition of the given matrix.\r\n  + trace: Returns the sum of the diagonal elements of matrix A; Sum(A[i,i]).\r\n  + trapezoidalLower: Modifies the matrix to be a lower trapezoidal matrix.\r\n  + vectorNorm2: Returns the two-norm (aka euclidean norm) of vector X.vectorize();\r\n  + xmultOuter: Outer product of two vectors; Returns a matrix with A[i,j] = x[i] * y[j].\r\n  + xpowSlow: Linear algebraic matrix power; B = Ak \u003c==\u003e B = A*A*...*A.\r\n\r\nProperties´ methods tested on matrices:\r\n=======================================\r\n\r\n  + density: Returns the matrix's fraction of non-zero cells; A.cardinality() / A.size().\r\n  + generate_non_singular!: Modifies the given square matrix A such that it is diagonally dominant by row and column, hence non-singular, hence invertible.\r\n  + diagonal?: A matrix A is diagonal if A[i,j] == 0 whenever i != j.\r\n  + diagonally_dominant_by_column?: A matrix A is diagonally dominant by column if the absolute value of each diagonal element is larger than the sum of the absolute values of the off-diagonal elements in the corresponding column.\r\n  + diagonally_dominant_by_row?: A matrix A is diagonally dominant by row if the absolute value of each diagonal element is larger than the sum of the absolute values of the off-diagonal elements in the corresponding row.\r\n  + identity?: A matrix A is an identity matrix if A[i,i] == 1 and all other cells are zero.\r\n  + lower_bidiagonal?: A matrix A is lower bidiagonal if A[i,j]==0 unless i==j || i==j+1.\r\n  + lower_triangular?: A matrix A is lower triangular if A[i,j]==0 whenever i \u003c j.\r\n  + nonnegative?: A matrix A is non-negative if A[i,j] \u003e= 0 holds for all cells.\r\n  + orthogonal?: A square matrix A is orthogonal if A*transpose(A) = I.\r\n  + positive?: A matrix A is positive if A[i,j] \u003e 0 holds for all cells.\r\n  + singular?: A matrix A is singular if it has no inverse, that is, iff det(A)==0.\r\n  + skew_symmetric?: A square matrix A is skew-symmetric if A = -transpose(A), that is A[i,j] == -A[j,i].\r\n  + square?: A matrix A is square if it has the same number of rows and columns.\r\n  + strictly_lower_triangular?: A matrix A is strictly lower triangular if A[i,j]==0 whenever i \u003c= j.\r\n  + strictly_triangular?: A matrix A is strictly triangular if it is triangular and its diagonal elements all equal 0.\r\n  + strictly_upper_triangular?: A matrix A is strictly upper triangular if A[i,j]==0 whenever i \u003e= j.\r\n  + symmetric?: A matrix A is symmetric if A = tranpose(A), that is A[i,j] == A[j,i].\r\n  + triangular?: A matrix A is triangular iff it is either upper or lower triangular.\r\n  + tridiagonal?: A matrix A is tridiagonal if A[i,j]==0 whenever Math.abs(i-j) \u003e 1.\r\n  + unit_triangular?: A matrix A is unit triangular if it is triangular and its diagonal elements all equal 1.\r\n  + upper_bidiagonal?: A matrix A is upper bidiagonal if A[i,j]==0 unless i==j || i==j-1.\r\n  + upper_triangular?: A matrix A is upper triangular if A[i,j]==0 whenever i \u003e j.\r\n  + zero?: A matrix A is zero if all its cells are zero.\r\n  + lower_bandwidth: The lower bandwidth of a square matrix A is the maximum i-j for which A[i,j] is nonzero and i \u003e j.\r\n  + semi_bandwidth: Returns the semi-bandwidth of the given square matrix A.\r\n  + upper_bandwidth: The upper bandwidth of a square matrix A is the maximum j-i for which A[i,j] is nonzero and j \u003e i.\r\n\r\nDescriptive statistics methods imported from Parallel Colt:\r\n===========================================================\r\n\r\n  + auto_correlation, correlation, covariance, durbin_watson, frequencies, geometric_mean, \r\n  + harmonic_mean, kurtosis, lag1, max, mean, mean_deviation, median, min, moment, moment3, \r\n  + moment4, pooled_mean, pooled_variance, product, quantile, quantile_inverse, \r\n  + rank_interpolated, rms, sample_covariance, sample_kurtosis, sample_kurtosis_standard_error, \r\n  + sample_skew, sample_skew_standard_error, sample_standard_deviation, sample_variance, \r\n  + sample_weighted_variance, skew, split,  standard_deviation, standard_error, sum, \r\n  + sum_of_inversions, sum_of_logarithms, sum_of_powers, sum_of_power_deviations, \r\n  + sum_of_squares, sum_of_squared_deviations, trimmed_mean, variance, weighted_mean, \r\n  + weighted_rms, weighted_sums, winsorized_mean.\r\n\r\nDouble and Float methods from Parallel Colt:\r\n============================================\r\n\r\n  + acos, asin, atan, atan2, ceil, cos, exp, floor, greater, IEEEremainder, inv, less, lg, \r\n  + log, log2, rint, sin, sqrt, tan.\r\n\r\nDouble, Float, Long and Int methods from Parallel Colt:\r\n=======================================================\r\n\r\n  + abs, compare, div, divNeg, equals, isEqual (is_equal), isGreater (is_greater), \r\n  + isles (is_less), max, min, minus, mod, mult, multNeg (mult_neg), multSquare (mult_square), \r\n  + neg, plus (add), plusAbs (plus_abs), pow (power), sign, square.\r\n\r\nLong and Int methods from Parallel Colt\r\n=======================================\r\n\r\n  + and, dec, factorial, inc, not, or, shiftLeft (shift_left), shiftRightSigned \r\n      (shift_right_signed), shiftRightUnsigned (shift_right_unsigned), xor.\r\n\r\nMDArray installation and download:\r\n==================================\r\n\r\n  + Install Jruby\r\n  + jruby –S gem install mdarray\r\n\r\nMDArray Homepages:\r\n==================\r\n\r\n  + http://rubygems.org/gems/mdarray\r\n  + https://github.com/rbotafogo/mdarray/wiki\r\n\r\nContributors:\r\n=============\r\nContributors are welcome.\r\n\r\nMDArray History:\r\n================\r\n\r\n  + 30/Dec/2014: Version 0.5.5.2 - Fix for StringArray\r\n  + 16/Nov/2014: Version 0.5.5.1 - Small bug fix\r\n  + 14/Nov/2013: Version 0.5.5 - Support for linear algebra methods\r\n  + 07/Aug/2013: Version 0.5.4 - Support for reading and writing NetCDF-3 files\r\n  + 24/Jun/2013: Version 0.5.3 – Over 90% Performance improvements for methods imported \r\n      from Parallel Colt and over 40% performance improvements for all other methods \r\n      (implemented in Ruby); \r\n  + 16/Mai/2013: Version 0.5.0 - All loops transferred to Java with over 50% performance \r\n      improvements.  Descriptive statistics from Parallel Colt;\r\n  + 19/Apr/2013: Version 0.4.3 - Fixes a simple, but fatal bug in 0.4.2.  No new features;\r\n  + 17/Apr/2013: Version 0.4.2 - Adds simple statistics and boolean operators;\r\n  + 05/Apr/2013: Version 0.4.0 – Initial release.\r\n\r\n","funding_links":[],"categories":["Data Structures","Scientific"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbotafogo%2Fmdarray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbotafogo%2Fmdarray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbotafogo%2Fmdarray/lists"}