%global _empty_manifest_terminate_build 0 Name: python-AutoDiff-group3 Version: 0.0.6 Release: 1 Summary: Automatic differentiation with dual numbers License: MIT License URL: https://github.com/cs207-project-erin-bruce-will/cs207-FinalProject Source0: https://mirrors.aliyun.com/pypi/web/packages/5b/b4/29b7f91771b8381c08c098ead7a00065da95ae6e39479d965ce28deef129/AutoDiff_group3-0.0.6.tar.gz BuildArch: noarch Requires: python3-numpy Requires: python3-pytest %description [![Build Status](https://travis-ci.com/cs207-project-erin-bruce-will/cs207-FinalProject.svg?branch=master)](https://travis-ci.com/cs207-project-erin-bruce-will/cs207-FinalProject) [![Coverage Status](https://coveralls.io/repos/github/cs207-project-erin-bruce-will/cs207-FinalProject/badge.svg)](https://coveralls.io/github/cs207-project-erin-bruce-will/cs207-FinalProject) # AutoDiff Developed by: Will Claybaugh, Bruce Xiong, Erin Williams Group #3, CS207 Fall 2018 ## Introduction Autodiff finds the derivatives of a function (to machine precision!) at the same time it finds the value of the function. ``` import autodiff.autodiff as ad x = ad.DualNumber('x', 2) y = ad.DualNumber('y', 3) out = x/y out.value # 0.66666, the value of 2 divided by 3 out.derivatives #{x: 1/3, y: -2/(3**2)}, the gradient of x/y at (2,3) ``` Autodiff works for functions and expressions with any number of inputs. Just pass those functions DualNumbers instead of regular ints/floats (and upgrade any math module functions to their autodiff equvalents) ## Installation Autodiff is on [PyPi](https://pypi.org/project/AutoDiff-group3/) and can be installed using the command ```pip install AutoDiff-group3```. To import, use ```import autodiff.autodiff as ad```. Autodiff can also be installed by downloading from [github](https://github.com/cs207-project-erin-bruce-will/cs207-FinalProject). Becuase it has no dependencies, you can simply add the repo folder to your python path (```import sys sys.path.insert(0, '/path_to_repo/')```) and import as normal. ## Examples Using autodiff is very simple: ``` import autodiff.autodiff as ad def f(a,b): return 3*a/b*ad.sin(a*b+2) out = f(ad.DualNumber('x',2),ad.DualNumber('y',3)) print(out.value) 1.978716 print(out.derivatives['x']) 0.116358 print(out.derivatives['y']) -1.24157 # get the value and derifative of f at a different point out = f(ad.DualNumber('x',0),ad.DualNumber('y',1)) ``` A Python 3 notebook containing more in-depth examples and usage is available [HERE](https://github.com/cs207-project-erin-bruce-will/cs207-FinalProject/blob/master/docs/Demo.ipynb) ## Documentation Click [HERE](https://github.com/cs207-project-erin-bruce-will/cs207-FinalProject/blob/master/docs/documentation.md) for full documentation. ## Dependencies Click [HERE](https://github.com/cs207-project-erin-bruce-will/cs207-FinalProject/blob/master/docs/requirements.txt) for a full listing of dependencies. ## License Click [HERE](https://github.com/cs207-project-erin-bruce-will/cs207-FinalProject/blob/master/LICENSE) to view our MIT License. %package -n python3-AutoDiff-group3 Summary: Automatic differentiation with dual numbers Provides: python-AutoDiff-group3 BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-AutoDiff-group3 [![Build Status](https://travis-ci.com/cs207-project-erin-bruce-will/cs207-FinalProject.svg?branch=master)](https://travis-ci.com/cs207-project-erin-bruce-will/cs207-FinalProject) [![Coverage Status](https://coveralls.io/repos/github/cs207-project-erin-bruce-will/cs207-FinalProject/badge.svg)](https://coveralls.io/github/cs207-project-erin-bruce-will/cs207-FinalProject) # AutoDiff Developed by: Will Claybaugh, Bruce Xiong, Erin Williams Group #3, CS207 Fall 2018 ## Introduction Autodiff finds the derivatives of a function (to machine precision!) at the same time it finds the value of the function. ``` import autodiff.autodiff as ad x = ad.DualNumber('x', 2) y = ad.DualNumber('y', 3) out = x/y out.value # 0.66666, the value of 2 divided by 3 out.derivatives #{x: 1/3, y: -2/(3**2)}, the gradient of x/y at (2,3) ``` Autodiff works for functions and expressions with any number of inputs. Just pass those functions DualNumbers instead of regular ints/floats (and upgrade any math module functions to their autodiff equvalents) ## Installation Autodiff is on [PyPi](https://pypi.org/project/AutoDiff-group3/) and can be installed using the command ```pip install AutoDiff-group3```. To import, use ```import autodiff.autodiff as ad```. Autodiff can also be installed by downloading from [github](https://github.com/cs207-project-erin-bruce-will/cs207-FinalProject). Becuase it has no dependencies, you can simply add the repo folder to your python path (```import sys sys.path.insert(0, '/path_to_repo/')```) and import as normal. ## Examples Using autodiff is very simple: ``` import autodiff.autodiff as ad def f(a,b): return 3*a/b*ad.sin(a*b+2) out = f(ad.DualNumber('x',2),ad.DualNumber('y',3)) print(out.value) 1.978716 print(out.derivatives['x']) 0.116358 print(out.derivatives['y']) -1.24157 # get the value and derifative of f at a different point out = f(ad.DualNumber('x',0),ad.DualNumber('y',1)) ``` A Python 3 notebook containing more in-depth examples and usage is available [HERE](https://github.com/cs207-project-erin-bruce-will/cs207-FinalProject/blob/master/docs/Demo.ipynb) ## Documentation Click [HERE](https://github.com/cs207-project-erin-bruce-will/cs207-FinalProject/blob/master/docs/documentation.md) for full documentation. ## Dependencies Click [HERE](https://github.com/cs207-project-erin-bruce-will/cs207-FinalProject/blob/master/docs/requirements.txt) for a full listing of dependencies. ## License Click [HERE](https://github.com/cs207-project-erin-bruce-will/cs207-FinalProject/blob/master/LICENSE) to view our MIT License. %package help Summary: Development documents and examples for AutoDiff-group3 Provides: python3-AutoDiff-group3-doc %description help [![Build Status](https://travis-ci.com/cs207-project-erin-bruce-will/cs207-FinalProject.svg?branch=master)](https://travis-ci.com/cs207-project-erin-bruce-will/cs207-FinalProject) [![Coverage Status](https://coveralls.io/repos/github/cs207-project-erin-bruce-will/cs207-FinalProject/badge.svg)](https://coveralls.io/github/cs207-project-erin-bruce-will/cs207-FinalProject) # AutoDiff Developed by: Will Claybaugh, Bruce Xiong, Erin Williams Group #3, CS207 Fall 2018 ## Introduction Autodiff finds the derivatives of a function (to machine precision!) at the same time it finds the value of the function. ``` import autodiff.autodiff as ad x = ad.DualNumber('x', 2) y = ad.DualNumber('y', 3) out = x/y out.value # 0.66666, the value of 2 divided by 3 out.derivatives #{x: 1/3, y: -2/(3**2)}, the gradient of x/y at (2,3) ``` Autodiff works for functions and expressions with any number of inputs. Just pass those functions DualNumbers instead of regular ints/floats (and upgrade any math module functions to their autodiff equvalents) ## Installation Autodiff is on [PyPi](https://pypi.org/project/AutoDiff-group3/) and can be installed using the command ```pip install AutoDiff-group3```. To import, use ```import autodiff.autodiff as ad```. Autodiff can also be installed by downloading from [github](https://github.com/cs207-project-erin-bruce-will/cs207-FinalProject). Becuase it has no dependencies, you can simply add the repo folder to your python path (```import sys sys.path.insert(0, '/path_to_repo/')```) and import as normal. ## Examples Using autodiff is very simple: ``` import autodiff.autodiff as ad def f(a,b): return 3*a/b*ad.sin(a*b+2) out = f(ad.DualNumber('x',2),ad.DualNumber('y',3)) print(out.value) 1.978716 print(out.derivatives['x']) 0.116358 print(out.derivatives['y']) -1.24157 # get the value and derifative of f at a different point out = f(ad.DualNumber('x',0),ad.DualNumber('y',1)) ``` A Python 3 notebook containing more in-depth examples and usage is available [HERE](https://github.com/cs207-project-erin-bruce-will/cs207-FinalProject/blob/master/docs/Demo.ipynb) ## Documentation Click [HERE](https://github.com/cs207-project-erin-bruce-will/cs207-FinalProject/blob/master/docs/documentation.md) for full documentation. ## Dependencies Click [HERE](https://github.com/cs207-project-erin-bruce-will/cs207-FinalProject/blob/master/docs/requirements.txt) for a full listing of dependencies. ## License Click [HERE](https://github.com/cs207-project-erin-bruce-will/cs207-FinalProject/blob/master/LICENSE) to view our MIT License. %prep %autosetup -n AutoDiff_group3-0.0.6 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-AutoDiff-group3 -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue Jun 20 2023 Python_Bot - 0.0.6-1 - Package Spec generated