{"id":19005514,"url":"https://github.com/star2dust/numpy-notes","last_synced_at":"2025-02-21T14:18:03.005Z","repository":{"id":130550730,"uuid":"275122880","full_name":"star2dust/numpy-notes","owner":"star2dust","description":"A tutorial to learn numpy and matplotlib.","archived":false,"fork":false,"pushed_at":"2020-06-27T02:27:41.000Z","size":663,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-01T19:29:01.128Z","etag":null,"topics":["matplotlib","numpy","tutorial"],"latest_commit_sha":null,"homepage":"https://star2dust.github.io/numpy-notes/","language":"HTML","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/star2dust.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":"2020-06-26T09:48:14.000Z","updated_at":"2020-08-16T08:05:43.000Z","dependencies_parsed_at":"2023-03-22T21:50:28.612Z","dependency_job_id":null,"html_url":"https://github.com/star2dust/numpy-notes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/star2dust%2Fnumpy-notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/star2dust%2Fnumpy-notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/star2dust%2Fnumpy-notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/star2dust%2Fnumpy-notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/star2dust","download_url":"https://codeload.github.com/star2dust/numpy-notes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240027430,"owners_count":19736212,"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":["matplotlib","numpy","tutorial"],"created_at":"2024-11-08T18:27:49.846Z","updated_at":"2025-02-21T14:18:02.981Z","avatar_url":"https://github.com/star2dust.png","language":"HTML","readme":"# Numpy and Matplotlib\n\n## Install Requirements\n\n```shell\npip install numpy\npip install matplotlib\n```\n\n## Tutorials\n\nSee [star2dust.github.io/numpy-notes/](https://star2dust.github.io/numpy-notes/). (Chinese)\n\n## Examples\n\n- Calculate `relu` and `sigmoid` function.\n\n```python\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport matplotlib.patches as patches\n\n# fig size\nplt.figure(figsize=(8, 3))\n\n# from -10.0 to 10.0 with interval = 0.1\nx = np.arange(-10, 10, 0.1)\n# calculate Sigmoid function\ns = 1.0 / (1 + np.exp(- x))\n\n# calculate ReLU function\ny = np.clip(x, a_min = 0., a_max = None)\n\n#########################################################\n# plot\n\n# two subfigures, Sigmoid in the left\nf = plt.subplot(121)\n# plot curve\nplt.plot(x, s, color='r')\n# add text\nplt.text(-5., 0.9, r'$y=\\sigma(x)$', fontsize=13)\n# set x and y axis\ncurrentAxis=plt.gca()\ncurrentAxis.xaxis.set_label_text('x', fontsize=15)\ncurrentAxis.yaxis.set_label_text('y', fontsize=15)\n\n# ReLU in the right\nf = plt.subplot(122)\n# plot curve\nplt.plot(x, y, color='g')\n# add text\nplt.text(-3.0, 9, r'$y=ReLU(x)$', fontsize=13)\n# set x and y axis\ncurrentAxis=plt.gca()\ncurrentAxis.xaxis.set_label_text('x', fontsize=15)\ncurrentAxis.yaxis.set_label_text('y', fontsize=15)\n\nplt.show()\n```\n\n\u003cimg src=\"examples/relu_sigmoid.png\" alt=\"relu_sigmoid\" width=\"350\"/\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstar2dust%2Fnumpy-notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstar2dust%2Fnumpy-notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstar2dust%2Fnumpy-notes/lists"}