{"action":"closed","issue":{"url":"https://api.github.com/repos/sympy/sympy/issues/7853","labels_url":"https://api.github.com/repos/sympy/sympy/issues/7853/labels{/name}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/7853/comments","events_url":"https://api.github.com/repos/sympy/sympy/issues/7853/events","html_url":"https://github.com/sympy/sympy/issues/7853","id":39973457,"number":7853,"title":"Deprecation of lambdify converting `Matrix` -> `numpy.matrix`","user":{"login":"jcrist","id":2783717,"avatar_url":"https://avatars.githubusercontent.com/u/2783717?v=3","gravatar_id":"","url":"https://api.github.com/users/jcrist","html_url":"https://github.com/jcrist","followers_url":"https://api.github.com/users/jcrist/followers","following_url":"https://api.github.com/users/jcrist/following{/other_user}","gists_url":"https://api.github.com/users/jcrist/gists{/gist_id}","starred_url":"https://api.github.com/users/jcrist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcrist/subscriptions","organizations_url":"https://api.github.com/users/jcrist/orgs","repos_url":"https://api.github.com/users/jcrist/repos","events_url":"https://api.github.com/users/jcrist/events{/privacy}","received_events_url":"https://api.github.com/users/jcrist/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sympy/sympy/labels/Deprecation%20Removal","name":"Deprecation Removal","color":"f7c6c7"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/sympy/sympy/milestones/42","html_url":"https://github.com/sympy/sympy/milestones/1.0","labels_url":"https://api.github.com/repos/sympy/sympy/milestones/42/labels","id":749891,"number":42,"title":"1.0","description":"The next version of SymPy after 0.7.6 will be 1.0 (barring any bugfix releases). This will have major changes including separation of mpmath as an external dependency, and a cleanup of the assumptions system. ","creator":{"login":"jcrist","id":2783717,"avatar_url":"https://avatars.githubusercontent.com/u/2783717?v=3","gravatar_id":"","url":"https://api.github.com/users/jcrist","html_url":"https://github.com/jcrist","followers_url":"https://api.github.com/users/jcrist/followers","following_url":"https://api.github.com/users/jcrist/following{/other_user}","gists_url":"https://api.github.com/users/jcrist/gists{/gist_id}","starred_url":"https://api.github.com/users/jcrist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcrist/subscriptions","organizations_url":"https://api.github.com/users/jcrist/orgs","repos_url":"https://api.github.com/users/jcrist/repos","events_url":"https://api.github.com/users/jcrist/events{/privacy}","received_events_url":"https://api.github.com/users/jcrist/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":6,"state":"open","created_at":"2014-08-11T16:10:26Z","updated_at":"2015-10-26T21:17:15Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2014-08-11T16:09:48Z","updated_at":"2015-10-26T21:17:16Z","closed_at":"2015-10-26T21:17:15Z","body":"This issue is for documenting the deprecation cycle for the default behavior of lambdify to convert `Matrix` to `numpy.matrix`. Per the numpy devs, `array` is always preferable to `matrix`, and many scipy functions only work with `array`. To avoid breaking code after the release, the following deprecation cycle will be observed:\r\n\r\n1. Prior to release of 0.7.6 (versions up to and including 0.7.5) lambdify converted `Matrix` to `numpy.matrix` by default.\r\n\r\n2. In 0.7.6, expressions that contain Matrices throw a SymPyDeprecationWarning warning the user of the upcoming change. The user is advised to set `modules=[{'ImmutableMatrix': numpy.array}, 'numpy']`, which will avoid the deprecation warning and result in `Matrix->array`. If they will be using `lambdify` often, a recommendation to apply `functools.partial` to set the kwarg permanently is also given.\r\n\r\n3. For the release of 0.7.7, `Matrix` -> `array` will be the new behavior.\r\n\r\nThe modules kwarg is set to `[{'ImmutableMatrix': numpy.array}, 'numpy']` for some uses of `lambdify` internally. For the release of 0.7.7 the use of modules in this case should be reverted.\r\n\r\nFor more rational on why this change was made, see #7284, and the implementing PR #8034."}}