{"id":16125687,"url":"https://github.com/dy/array-normalize","last_synced_at":"2025-09-12T21:33:10.970Z","repository":{"id":57184060,"uuid":"79914251","full_name":"dy/array-normalize","owner":"dy","description":"Normalize array to zero mean and unit variance","archived":false,"fork":false,"pushed_at":"2024-07-12T21:14:31.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-29T00:12:20.983Z","etag":null,"topics":["array","dsp","math","statistics"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dy.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-24T13:31:40.000Z","updated_at":"2024-07-12T21:14:34.000Z","dependencies_parsed_at":"2024-10-19T05:25:02.182Z","dependency_job_id":null,"html_url":"https://github.com/dy/array-normalize","commit_stats":{"total_commits":24,"total_committers":2,"mean_commits":12.0,"dds":0.04166666666666663,"last_synced_commit":"646efa94bc55fdd06ff961c8b9038643a55565b5"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Farray-normalize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Farray-normalize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Farray-normalize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Farray-normalize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dy","download_url":"https://codeload.github.com/dy/array-normalize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232792150,"owners_count":18577262,"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":["array","dsp","math","statistics"],"created_at":"2024-10-09T21:30:40.320Z","updated_at":"2025-09-12T21:33:10.949Z","avatar_url":"https://github.com/dy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# array-normalize  [![experimental](https://img.shields.io/badge/stability-unstable-yellow.svg)](http://github.com/badges/stability-badges) \nNormalize array to unit length, that is 0..1 range. See [feature scaling](https://en.wikipedia.org/wiki/Feature_scaling).\n\n[![npm install array-normalize](https://nodei.co/npm/array-normalize.png?mini=true)](https://npmjs.org/package/array-normalize/)\n\n```js\nconst normalize = require('array-normalize')\n\nnormalize([0, 50, 100]) // [0, .5, 1]\nnormalize([0, 0, .1, .2, 1, 2], 2) // [0, 0, .1, .1, 1, 1]\nnormalize([0, .25, 1, .25], 2, [0, .5, 1, .5]) // [0, .5, 1, .5])\n```\n\n## API\n\n### array = normalize(array, stride=1, bounds?)\n\nNormalizes n-dimensional array in-place using optional stride for n-dimensions, ie. for 2d data layout is `[x, y, x, y, ...]`.\n\nEvery dimension is normalized independently, eg. 2d array is normalized to unit square `[0, 0, 1, 1]`.\n\nOptional `bounds` box can predefine min/max to skip bounds detection.\n\n\u003cp align=\"center\"\u003eॐ\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdy%2Farray-normalize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdy%2Farray-normalize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdy%2Farray-normalize/lists"}