Repository: sympy/sympy

Issue:
Legendre functions for non-integer arguments
In module `mpmath`, Legendre functions of first and second kind are provided with `legenp` and `legenq`, they are callable with non-integer argument:
```
>>> legenp(2.2,1.1,0.1)
0.316775546015185
```
In Sympy, only the first kind seems to be available with `legendre` and `assoc_legendre`. Moreover, they seem to be callable with integer only argument:
```
>>> assoc_legendre(2.2,1.1,0.1)
assoc_legendre(2.2, 1.1, 0.1)
```
Would it be possible to add support for first and second kind Legendre functions and associated Legendre functions with non-integer arguments ?

Discussion:

Patch:
diff --git a/sympy/utilities/lambdify.py b/sympy/utilities/lambdify.py
index a062903290..23fbf1299f 100644
--- a/sympy/utilities/lambdify.py
+++ b/sympy/utilities/lambdify.py
@@ -67,6 +67,7 @@
     "ceiling": "ceil",
     "chebyshevt": "chebyt",
     "chebyshevu": "chebyu",
+    "assoc_legendre": "legenp",
     "E": "e",
     "I": "j",
     "ln": "log",


Test patch:
diff --git a/sympy/utilities/tests/test_lambdify.py b/sympy/utilities/tests/test_lambdify.py
index 6cf2d5dc57..7ee8e84d6d 100644
--- a/sympy/utilities/tests/test_lambdify.py
+++ b/sympy/utilities/tests/test_lambdify.py
@@ -8,7 +8,7 @@
 from sympy.testing.pytest import raises, warns_deprecated_sympy
 from sympy.concrete.summations import Sum
 from sympy.core.function import (Function, Lambda, diff)
-from sympy.core.numbers import (E, Float, I, Rational, oo, pi)
+from sympy.core.numbers import (E, Float, I, Rational, all_close, oo, pi)
 from sympy.core.relational import Eq
 from sympy.core.singleton import S
 from sympy.core.symbol import (Dummy, symbols)
@@ -1879,3 +1879,15 @@ def test_lambdify_empty_tuple():
     f = lambdify(a, expr)
     result = f(1)
     assert result == ((), (1,)), "Lambdify did not handle the empty tuple correctly."
+
+def test_assoc_legendre_numerical_evaluation():
+
+    tol = 1e-10
+
+    sympy_result_integer = assoc_legendre(1, 1/2, 0.1).evalf()
+    sympy_result_complex = assoc_legendre(2, 1, 3).evalf()
+    mpmath_result_integer = -0.474572528387641
+    mpmath_result_complex = -25.45584412271571*I
+
+    assert all_close(sympy_result_integer, mpmath_result_integer, tol)
+    assert all_close(sympy_result_complex, mpmath_result_complex, tol)