{"id":19674595,"url":"https://github.com/alimuhammadofficial/numpy-mean-var-std-max-min","last_synced_at":"2026-06-17T14:33:24.174Z","repository":{"id":125228075,"uuid":"291698916","full_name":"AliMuhammadOfficial/numpy-mean-var-std-max-min","owner":"AliMuhammadOfficial","description":null,"archived":false,"fork":false,"pushed_at":"2020-08-31T11:42:51.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T05:42:16.992Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AliMuhammadOfficial.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-08-31T11:39:21.000Z","updated_at":"2020-08-31T11:42:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"35018ff1-1525-4cf6-bae4-02aef9d10939","html_url":"https://github.com/AliMuhammadOfficial/numpy-mean-var-std-max-min","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AliMuhammadOfficial/numpy-mean-var-std-max-min","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliMuhammadOfficial%2Fnumpy-mean-var-std-max-min","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliMuhammadOfficial%2Fnumpy-mean-var-std-max-min/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliMuhammadOfficial%2Fnumpy-mean-var-std-max-min/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliMuhammadOfficial%2Fnumpy-mean-var-std-max-min/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AliMuhammadOfficial","download_url":"https://codeload.github.com/AliMuhammadOfficial/numpy-mean-var-std-max-min/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AliMuhammadOfficial%2Fnumpy-mean-var-std-max-min/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34453431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-11T17:19:06.298Z","updated_at":"2026-06-17T14:33:24.168Z","avatar_url":"https://github.com/AliMuhammadOfficial.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Assignment\n\nCreate a function named `calculate()` in `mean_var_std.py` that uses Numpy to output the mean, variance, standard deviation, max, min, and sum of the rows, columns, and elements in a 3 x 3 matrix. \n\nThe input of the function should be a list containing 9 digits. The function should convert the list into a 3 x 3 Numpy array, and then return a dictionary containing the mean, variance, standard deviation, max, min, and sum along both axes and for the flattened matrix. \n\nThe returned dictionary should follow this format:\n```py\n{\n  'mean': [axis1, axis2, flattened],\n  'variance': [axis1, axis2, flattened],\n  'standard deviation': [axis1, axis2, flattened],\n  'max': [axis1, axis2, flattened],\n  'min': [axis1, axis2, flattened],\n  'sum': [axis1, axis2, flattened]\n}\n```\n\nIf a list containing less than 9 elements is passed into the function, it should raise a `ValueError` exception with the message: \"List must contain nine numbers.\" The values in the returned dictionary should be lists and not Numpy arrays.\n\nFor example, `calculate([0,1,2,3,4,5,6,7,8])` should return:\n```py\n{\n  'mean': [[3.0, 4.0, 5.0], [1.0, 4.0, 7.0], 4.0], \n  'variance': [[6.0, 6.0, 6.0], [0.6666666666666666, 0.6666666666666666, 0.6666666666666666], 6.666666666666667], \n  'standard deviation': [[2.449489742783178, 2.449489742783178, 2.449489742783178], [0.816496580927726, 0.816496580927726, 0.816496580927726], 2.581988897471611],\n  'max': [[6, 7, 8], [2, 5, 8], 8],\n  'min': [[0, 1, 2], [0, 3, 6], 0],\n  'sum': [[9, 12, 15], [3, 12, 21], 36]}\n}\n```\n\nThe unit tests for this project are in `test_module.py`.\n\n### Development\n\nFor development, you can use `main.py` to test your `calculate()` function. Click the \"run\" button and `main.py` will run.\n\n### Testing \n\nWe imported the tests from `test_module.py` to `main.py` for your convenience. The tests will run automatically whenever you hit the \"run\" button.\n\n### Submitting\n\nCopy your project's URL and submit it to freeCodeCamp.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falimuhammadofficial%2Fnumpy-mean-var-std-max-min","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falimuhammadofficial%2Fnumpy-mean-var-std-max-min","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falimuhammadofficial%2Fnumpy-mean-var-std-max-min/lists"}