Skip to content

Commit

Permalink
Merge remote-tracking branch 'sympy/master' into patch-for-#11062
Browse files Browse the repository at this point in the history
  • Loading branch information
arihantparsoya committed May 6, 2016
2 parents 3acb974 + dd6d01c commit 41bfc43
Show file tree
Hide file tree
Showing 284 changed files with 9,250 additions and 5,143 deletions.
21 changes: 21 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,24 @@ Arafat Dad Khan <arafat.da.khan@gmail.com> Arafat <arafat.da.khan@gmail.com>
Aqnouch Mohammed <aqnouch.mohammed@gmail.com> AQNOUCH Mohammed <aqnouch.mohammed@gmail.com>
Meghana Madhyastha <meghana.madhyastha@gmail.com> Meghana <meghana.madhyastha@gmail.com>
Tanu Hari Dixit <tokencolour@gmail.com> tokencolour <tokencolour@gmail.com>
Arafat Dad Khan <arafat.da.khan@gmail.com> Arafatk <arafat@iitkpg.ac.in>
Alkiviadis G. Akritas <akritas@uth.gr> alkis akritas <akritas@uth.gr>
Guo Xingjian <Seeker1995@gmail.com> MSeeker <Seeker1995@gmail.com>
Shubham Tibra <shubh.tibra@gmail.com> shubhamtibra <shubh.tibra@gmail.com>
Bhautik Mavani <mavanibhautik@gmail.com> mvnnn <mavanibhautik@gmail.com>
Pablo Zubieta <pabloferz@yahoo.com.mx> pabloferz <pabloferz@yahoo.com.mx>
Asish Panda <asishrocks95@gmail.com> kaichogami <asishrocks95@gmail.com>
Edward Schembor <eschemb1@jhu.edu> Edward <eschemb1@jhu.edu>
Harshil Goel <harshil158@gmail.com> harshil goel <harshil158@gmail.com>
Lukas Zorich <lukas.zorich@gmail.com> lukas <lukas.zorich@gmail.com>
Shashank Agarwal <shashank.agarwal94@gmail.com> shashank-agg <shashank.agarwal94@gmail.com>
Rajath Shashidhara <rajaths.rajaths@gmail.com> rajaths589 <rajaths.rajaths@gmail.com>
Chaitanya Sai Alaparthi <achaitanyasai@gmail.com> chaitanya sai alaparthi <achaitanyasai@gmail.com>
Abhinav Agarwal <abhinavagarwal1996@gmail.com> abhinavagarwal07 <abhinavagarwal1996@gmail.com>
Rishabh Daal <rishabhdaal@gmail.com> rd13123013 <rishabhdaal@gmail.com>
Aravind Reddy <aravindreddy255@gmail.com> Aravind <aravindreddy255@gmail.com>
Akshay Siramdas <akshaysiramdas@gmail.com> AkshaySiramdas <akshaysiramdas@gmail.com>
Nitin Chaudhary <nitinmax1000@gmail.com> Nitin <nitinmax1000@gmail.com>
Alex Argunov <sajkoooo@gmail.com> alex argunov <sajkoooo@gmail.com>
Abhishek Garg <abhishekgarg119@gmail.com> abhishek garg <abhishekgarg119@gmail.com>
Gaurav Dhingra <axyd0000@gmail.com> Gaurav Dhingra <igauravdhingra@protonmail.com>
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ env:
secure: "SyoeHaDi9vRPJ5X0JFY5/nQif66u+fehtqUg7F8ILoNrwugJcs+u4VZm1sJ7Cv2h6uGoNRAfkkrahxxj2mKCgpqbY2MdDAZ+ru5wn5R0NjYjTpEz7ET4Xq5o+gca+mhFMkiutYihM73+AaIKCX0vfC9yb8WBPXzbbrv8vVvQr6Y="

python:
- 2.6
- 2.7
- 3.2
- 3.3
- 3.4
- 3.5
Expand Down
59 changes: 53 additions & 6 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ Pramod Ch <pramodch14@gmail.com>
Akshay <akshaynukala95@gmail.com>
Buck Shlegeris <buck2@bruceh15.anu.edu.au>
Jonathan Miller <jdmiller93@gmail.com>
Edward <eschemb1@jhu.edu>
Rajath S <rajaths.rajaths@gmail.com>
Edward Schembor <eschemb1@jhu.edu>
Rajath Shashidhara <rajaths.rajaths@gmail.com>
Zamrath Nizam <zamiguy_ni@yahoo.com>
Aditya Shah <adityashah30@gmail.com>
Rajat Aggarwal <rajataggarwal1975@gmail.com>
Expand Down Expand Up @@ -331,7 +331,7 @@ Dhruvesh Vijay Parikh <parikhdhruvesh1@gmail.com>
Venkatesh Halli <venkatesh.fatality@gmail.com>
Lennart Fricke <lennart@die-frickes.eu>
Vlad Seghete <vlad.seghete@gmail.com>
shashank-agg <shashank.agarwal94@gmail.com>
Shashank Agarwal <shashank.agarwal94@gmail.com>
carstimon <carstimon@gmail.com>
Pierre Haessig <pierre.haessig@crans.org>
Maciej Baranski <getrox.sc@gmail.com>
Expand Down Expand Up @@ -373,7 +373,7 @@ Shivam Vats <shivamvats.iitkgp@gmail.com>
Longqi Wang <iqgnol@gmail.com>
Juan Felipe Osorio <jfosorio@gmail.com>
GitRay <pix2@_nospam_.cathcart.us>
lukas <lukas.zorich@gmail.com>
Lukas Zorich <lukas.zorich@gmail.com>
Eric Miller <emiller42@gmail.com>
Venkata Ramana <idlike2dream@gmail.com>
Cody Herbst <cyherbst@gmail.com>
Expand All @@ -384,13 +384,13 @@ Guillaume Gay <contact@damcb.com>
Ray Cathcart <github@cathcart.us>
Mihir Wadwekar <m.mihirw@gmail.com>
Tuan Manh Lai <laituan245@gmail.com>
kaichogami <asishrocks95@gmail.com>
Asish Panda <asishrocks95@gmail.com>
Darshan Chaudhary <deathbullet@gmail.com>
Alec Kalinin <alec.kalinin@gmail.com>
Ralf Stephan <ralf@ark.in-berlin.de>
Aaditya Nair <aadityanair6494@gmail.com>
Jayesh Lahori <jlahori92@gmail.com>
harshil goel <harshil158@gmail.com>
Harshil Goel <harshil158@gmail.com>
Luv Agarwal <agarwal.iiit@gmail.com>
Jason Ly <jason.ly@gmail.com>
Lokesh Sharma <lokeshhsharma@gmail.com>
Expand Down Expand Up @@ -464,4 +464,51 @@ Tanu Hari Dixit <tokencolour@gmail.com>
Shekhar Prasad Rajak <shekharrajak@live.com>
Aqnouch Mohammed <aqnouch.mohammed@gmail.com>
Arafat Dad Khan <arafat.da.khan@gmail.com>
Boris Atamanovskiy <shaomoron@gmail.com>
Sam Tygier <sam.tygier@hep.manchester.ac.uk>
Jai Luthra <me@jailuthra.in>
Guo Xingjian <Seeker1995@gmail.com>
Sandeep Veethu <sandeep.veethu@gmail.com>
Archit Verma <architv07@gmail.com>
Shubham Tibra <shubh.tibra@gmail.com>
Ashutosh Saboo <ashutosh.saboo96@gmail.com>
Michael S. Hansen <michael.hansen@nih.gov>
Anish Shah <shah.anish07@gmail.com>
Harshil Goel <darkcoderrises@users.noreply.github.com>
Guillaume Jacquenot <guillaume.jacquenot@gmail.com>
Bhautik Mavani <mavanibhautik@gmail.com>
Michał Radwański <enedil.isildur@gmail.com>
Jerry Li <jerry@jerryli.ca>
Pablo Zubieta <pabloferz@yahoo.com.mx>
Curious72 <knowthyself2503@gmail.com>
Chaitanya Sai Alaparthi <achaitanyasai@gmail.com>
Ruslan Pisarev <rpisarev@cloudlinux.com>
Akash Trehan <akash.trehan123@gmail.com>
Nishant Nikhil <nishantiam@gmail.com>
Vladimir Poluhsin <vovapolu@gmail.com>
Akshay Nagar <awesomeay13@yahoo.com>
James Brandon Milam <jmilam343@gmail.com>
Abhinav Agarwal <abhinavagarwal1996@gmail.com>
Rishabh Daal <rishabhdaal@gmail.com>
Sanya Khurana <sanya@monica.in>
Aman Deep <amandeep1024@gmail.com>
Aravind Reddy <aravindreddy255@gmail.com>
Abhishek Verma <iamvermaabhishek@gmail.com>
Matthew Parnell <matt@parnmatt.co.uk>
Thomas Hickman <Thomas.Hickman42@gmail.com>
Akshay Siramdas <akshaysiramdas@gmail.com>
YiDing Jiang <yidinggjiangg@gmail.com>
Jatin Yadav <jatinyadav25@gmail.com>
Matthew Thomas <mnmt@users.noreply.github.com>
Rehas Sachdeva <aquannie@gmail.com>
Michael Mueller <michaeldmueller7@gmail.com>
Srajan Garg <srajan.garg@gmail.com>
Prabhjot Singh <prabhjot.nith@gmail.com>
Haruki Moriguchi <harukimoriguchi@gmail.com>
Tom Gijselinck <tomgijselinck@gmail.com>
Nitin Chaudhary <nitinmax1000@gmail.com>
Alex Argunov <sajkoooo@gmail.com>
Nathan Musoke <nathan.musoke@gmail.com>
Abhishek Garg <abhishekgarg119@gmail.com>
Dana Jacobsen <dana@acm.org>
Vasiliy Dommes <vasdommes@gmail.com>
10 changes: 6 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SymPy
=====

|pypi version| |pypi download| |Build status| |Gitter Badge|
|pypi version| |pypi download| |Build status| |Gitter Badge| |Zenodo Badge|

.. |pypi version| image:: https://img.shields.io/pypi/v/sympy.svg
:target: https://pypi.python.org/pypi/sympy
Expand All @@ -12,6 +12,8 @@ SymPy
.. |Gitter Badge| image:: https://badges.gitter.im/Join%20Chat.svg
:alt: Join the chat at https://gitter.im/sympy/sympy
:target: https://gitter.im/sympy/sympy?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
.. |Zenodo Badge| image:: https://zenodo.org/badge/18918/sympy/sympy.svg
:target: https://zenodo.org/badge/latestdoi/18918/sympy/sympy

A Python library for symbolic mathematics.

Expand Down Expand Up @@ -69,7 +71,7 @@ From this directory, start python and::
>>> x = Symbol('x')
>>> e = 1/cos(x)
>>> print e.series(x, 0, 10)
1 + (1/2)*x**2 + (5/24)*x**4 + (61/720)*x**6 + (277/8064)*x**8 + O(x**10)
1 + x**2/2 + 5*x**4/24 + 61*x**6/720 + 277*x**8/8064 + O(x**10)

SymPy also comes with a console that is a simple wrapper around the
classic python console (or IPython when available) that loads the
Expand Down Expand Up @@ -223,15 +225,15 @@ Citation

To cite SymPy in publications use::

SymPy Development Team (2014). SymPy: Python library for symbolic mathematics
SymPy Development Team (2016). SymPy: Python library for symbolic mathematics
URL http://www.sympy.org.

A BibTeX entry for LaTeX users is::

@Manual{,
title = {SymPy: Python library for symbolic mathematics},
author = {{SymPy Development Team}},
year = {2014},
year = {2016},
url = {http://www.sympy.org},
}

Expand Down
6 changes: 6 additions & 0 deletions bin/authors_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,9 @@ def move(l, i1, i2):
fd.write("\n")
fd.write("\n".join(git_people).encode("utf8"))
fd.write("\n")

print(blue("""
Please make sure that there are no duplicates in the new AUTHORS, then commit
the changes. You may also want to run ./bin/mailmap_update.py to update
.mailmap as well
"""))
6 changes: 2 additions & 4 deletions bin/mailmap_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,8 @@

print(blue(filldedent("""Read the text at the top of AUTHORS and the text at
the top of .mailmap for information on how to fix the below errors. If
someone is missing from AUTHORS, add them where they would have been if they
were added after their first pull request was merged (checkout the merge
commit from the first pull request and see who is at the end of the AUTHORS
file at that commit.)""")))
someone is missing from AUTHORS, use the ./bin/update_authors.py script to add
them.""")))

print()
print(yellow("People who are in AUTHORS but not in git:"))
Expand Down
6 changes: 3 additions & 3 deletions doc/src/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
Installation
------------

The SymPy CAS can be installed on virtually any computer with Python 2.6 or
The SymPy CAS can be installed on virtually any computer with Python 2.7 or
above. SymPy does require `mpmath`_ Python library to be installed first. The
current recommended method of installation is through Anaconda, which includes
mpmath, as well as several other useful libraries. Alternatively, executables
are available for Windows, and some Linux distributions have SymPy packages
available.

SymPy officially supports Python 2.6, 2.7, 3.2, 3.3, 3.4, and PyPy.
SymPy officially supports Python 2.7, 3.3, 3.4, and PyPy.

Anaconda
========
Expand Down Expand Up @@ -78,7 +78,7 @@ For a starter guide on using SymPy effectively, refer to the :ref:`tutorial`.
Mpmath
======

Versions of SymPy prior to 0.7.7 included `mpmath`_, but it now depends on it as
Versions of SymPy prior to 1.0 included `mpmath`_, but it now depends on it as
an external dependency. If you installed SymPy with Anaconda, it will already
include mpmath. Use::

Expand Down
29 changes: 11 additions & 18 deletions doc/src/modules/codegen.rst
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ how it works::
⎛ 2 ⎞
I⋅S⋅γ₁⋅γ₂⋅k⋅⎝3⋅cos (β) - 1⎠
───────────────────────────
3
r
3
r
>>> print(jscode(expr, assign_to="H_is"))
H_is = I*S*gamma_1*gamma_2*k*(3*Math.pow(Math.cos(beta), 2) - 1)/Math.pow(r, 3);
>>> print(ccode(expr, assign_to="H_is"))
Expand Down Expand Up @@ -260,16 +260,9 @@ given prefix.
Here is an example::

>>> [(f_name, f_code), header] = codegen(("volume", length*breadth*height),
... "F95", header=True, empty=False, argument_sequence=(breadth, length),
... "F95", header=False, empty=False, argument_sequence=(breadth, length),
... global_vars=(height,))
>>> print(f_code)
!******************************************************************************
!* Code generated with sympy 1.0.1.dev *
!* *
!* See http://www.sympy.org/ for more information. *
!* *
!* This file is part of 'project' *
!******************************************************************************
REAL*8 function volume(breadth, length)
implicit none
REAL*8, intent(in) :: breadth
Expand Down Expand Up @@ -346,7 +339,7 @@ imports it into the current session. Main functions of this module are

It also automatically converts expressions containing ``Indexed`` objects into
summations. The classes IndexedBase, Indexed and Idx represent a matrix element
M[i, j]. See :ref:`tensor_module` for more on this.
M[i, j]. See :ref:`tensor_module` for more on this.

.. _autowrap:

Expand Down Expand Up @@ -449,7 +442,7 @@ functions with Sympy attributes and methods. An illustration::
.. _ufuncify_method:

While NumPy operations are very efficient for vectorized data but they
sometimes incur unnecessary costs when chained together.
sometimes incur unnecessary costs when chained together.
Consider the following operation

>>> x = get_numpy_array(...) # doctest: +SKIP
Expand Down Expand Up @@ -488,12 +481,12 @@ optimizations. Fortunately, SymPy is able to generate efficient low-level C
or Fortran code. It can then depend on projects like ``Cython`` or ``f2py`` to
compile and reconnect that code back up to Python. Fortunately this process is
well automated and a SymPy user wishing to make use of this code generation
should call the ``ufuncify`` function.
should call the ``ufuncify`` function.

``ufuncify`` is the third method available with Autowrap module. It basically
implies 'Universal functions' and follows an ideology set by Numpy. The main
point of ufuncify as compared to autowrap is that it allows arrays as arguments
and can operate in an element-by-element fashion. The core operation done
``ufuncify`` is the third method available with Autowrap module. It basically
implies 'Universal functions' and follows an ideology set by Numpy. The main
point of ufuncify as compared to autowrap is that it allows arrays as arguments
and can operate in an element-by-element fashion. The core operation done
element-wise is in accordance to Numpy's array broadcasting rules. See `this
<http://docs.scipy.org/doc/numpy/reference/ufuncs.html>`_ for more.

Expand Down Expand Up @@ -547,5 +540,5 @@ Let us compare the speeds::
The options available with ufuncify are more or less the same as those
available with ``autowrap``.

There are other facilities available with Sympy to do efficient numeric
There are other facilities available with Sympy to do efficient numeric
computation. See :ref:`this<numeric_computation>` page for a comparison among them.
8 changes: 4 additions & 4 deletions doc/src/modules/numeric-computation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ uFuncify

The ``autowrap`` module contains methods that help in efficient computation.

* :ref:`autowrap<autowrap>` method for compiling code generated by the
* :ref:`autowrap<autowrap>` method for compiling code generated by the
:ref:`codegen<codegen_prose>` module, and wrap the binary for use in python.

* :ref:`binary_function<binary_function>` method automates the steps needed to autowrap
* :ref:`binary_function<binary_function>` method automates the steps needed to autowrap
the SymPy expression and attaching it to a ``Function`` object with ``implemented_function()``.

* :ref:`ufuncify<ufuncify_method>` generates a binary function that supports broadcasting
on numpy arrays using different backends that are faster as compared to ``subs/evalf``
* :ref:`ufuncify<ufuncify_method>` generates a binary function that supports broadcasting
on numpy arrays using different backends that are faster as compared to ``subs/evalf``
and ``lambdify``.

The API reference of all the above is listed here: :py:func:`sympy.utilities.autowrap`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ linearization to correctly work. ::
... kd_eqs=kd)
>>> print('Before Forming Generalized Active and Inertia Forces, Fr and Fr*')
Before Forming Generalized Active and Inertia Forces, Fr and Fr*
>>> (fr, frstar) = KM.kanes_equations(FL, BL)
>>> (fr, frstar) = KM.kanes_equations(BL, FL)
>>> print('Base Equations of Motion Computed')
Base Equations of Motion Computed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ coordinates need to be provided to the class. In this case we'll use `q_2` and
>>> KM = KanesMethod(N, q_ind=[q2], u_ind=[u2], q_dependent=[q1],
... u_dependent=[u1], configuration_constraints=f_c,
... velocity_constraints=f_v, kd_eqs=kde)
>>> (fr, frstar) = KM.kanes_equations([(P, R)], [pP])
>>> (fr, frstar) = KM.kanes_equations([pP],[(P, R)])

For linearization, operating points can be specified on the call, or be
substituted in afterwards. In this case we'll provide them in the call,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Fr* from the body list, compute the mass matrix and forcing terms, then solve
for the u dots (time derivatives of the generalized speeds). ::

>>> KM = KanesMethod(N, q_ind=[q1, q2, q3], u_ind=[u1, u2, u3], kd_eqs=kd)
>>> (fr, frstar) = KM.kanes_equations(ForceList, BodyList)
>>> (fr, frstar) = KM.kanes_equations(BodyList, ForceList)
>>> MM = KM.mass_matrix
>>> forcing = KM.forcing
>>> rhs = MM.inv() * forcing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ represent the constraint forces in those directions. ::

>>> KM = KanesMethod(N, q_ind=[q1, q2, q3], u_ind=[u1, u2, u3], kd_eqs=kd,
... u_auxiliary=[u4, u5, u6])
>>> (fr, frstar) = KM.kanes_equations(ForceList, BodyList)
>>> (fr, frstar) = KM.kanes_equations(BodyList, ForceList)
>>> MM = KM.mass_matrix
>>> forcing = KM.forcing
>>> rhs = MM.inv() * forcing
Expand Down
2 changes: 1 addition & 1 deletion doc/src/modules/physics/mechanics/kane.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ or ``(ReferenceFrame, Vector)`` to represent applied forces and torques. ::
>>> BL = [Pa]
>>> FL = [(P, 7 * N.x)]
>>> KM = KanesMethod(N, [q], [u], [qd - u])
>>> (fr, frstar) = KM.kanes_equations(FL, BL)
>>> (fr, frstar) = KM.kanes_equations(BL, FL)
>>> KM.mass_matrix
Matrix([[5]])
>>> KM.forcing
Expand Down
2 changes: 1 addition & 1 deletion doc/src/modules/physics/mechanics/linearize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ pendulum system: ::

>>> # Solve for eom with kanes method
>>> KM = KanesMethod(N, q_ind=[q1], u_ind=[u1], kd_eqs=kde)
>>> fr, frstar = KM.kanes_equations([(P, R)], [pP])
>>> fr, frstar = KM.kanes_equations([pP], [(P, R)])

1. Using the ``Linearizer`` class directly:
-------------------------------------------
Expand Down
Loading

0 comments on commit 41bfc43

Please sign in to comment.