{"id":28102263,"url":"https://github.com/stephtr/wrapped-optimizations","last_synced_at":"2026-02-16T05:32:55.613Z","repository":{"id":292240561,"uuid":"960531172","full_name":"stephtr/wrapped-optimizations","owner":"stephtr","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-30T23:42:15.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-31T20:49:08.039Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stephtr.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-04T15:40:49.000Z","updated_at":"2025-06-30T23:42:18.000Z","dependencies_parsed_at":"2025-08-31T20:33:53.631Z","dependency_job_id":"41d7af9f-e1d1-4cf9-a02d-585878723007","html_url":"https://github.com/stephtr/wrapped-optimizations","commit_stats":null,"previous_names":["stephtr/wrapped-optimizations"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stephtr/wrapped-optimizations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephtr%2Fwrapped-optimizations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephtr%2Fwrapped-optimizations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephtr%2Fwrapped-optimizations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephtr%2Fwrapped-optimizations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephtr","download_url":"https://codeload.github.com/stephtr/wrapped-optimizations/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephtr%2Fwrapped-optimizations/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29500832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T03:57:51.541Z","status":"ssl_error","status_checked_at":"2026-02-16T03:55:59.854Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2025-05-13T19:48:54.009Z","updated_at":"2026-02-16T05:32:55.596Z","avatar_url":"https://github.com/stephtr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wrapped-Optimizations\n\n## Description\n\n`wrapped_optimizations` is a Python wrapper around some of SciPy's optimization functions. Instead of having one 1D array which contains all parameters to be optimized, the wrapped functions allow the parameters to be defined locally in the functions to be optimized.\n\n## Installation\n\nTo install this package, use pip:\n\n```bash\npip install wrapped_optimizations\n```\n\n## Usage\n\nHere is a simple example of how to use Wrapped-Optimizations:\n\n```python\nfrom wrapped_optimizations import differential_evolution, eval_function\n\ndef func(use_param, use_const, use_print=False):\n    # define a named parameter\n    x = use_param((2), 'x', bounds=(-5, 5))\n    # define an unnamed parameter\n    y = use_param((2,2), bounds=(-5, 5))\n\n    # define a (named) constant\n    # equals `N = 3`, but with the advantage that the value also gets saved to result.x\n    N = use_const(3, name='N')\n\n    V = use_param((N), bounds=(0, 20))\n    if use_print:\n        print(f'V: {V}')\n    return np.linalg.norm(x - 1)**2 + np.linalg.norm(y - 3)**2\n\nresult = differential_evolution(func)\n# result.x now contains all the parameters and constants\n# {\n#   'x': array([1., 1.]),\n#   'param_1': array([[3., 3.], [3., 3.]]),\n#   'param_2': array([ 9.49532267, 16.89317493,  9.37888973]),\n#   'N': 3\n# }\n\n# `func` can now be called, also with additional parameters being forwarded to `func`:\n# eval_function(func, result.x, True)\n```\n\n## Requirements\n\nWrapped-Optimizations requires the following Python libraries:\n\n- NumPy\n- SciPy\n\n## License\n\nThis project is licensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephtr%2Fwrapped-optimizations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephtr%2Fwrapped-optimizations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephtr%2Fwrapped-optimizations/lists"}