Skip to main content

Home/ Python Programming/ Group items tagged lambda

Rss Feed Group items tagged

dshekhar17

Python Lambda Function/Anonymous Function | Hack The Developer - 0 views

  •  
    Python Lambda Function/Anonymous Function
anonymous

Python: Lambda Functions - 12 views

  •  
    lambda functions
reckoner reckoner

Applying sympy expressions on numpy arrays - sympy | Google Groups - 0 views

  • If I have:     from sympy import Symbol, Integrate     x = Symbol('x')     f = x**2 + x     g = Integrate(f, x) how can I apply g to a numpy array? In other words, how can I "numpify" the g expression, injecting in it x = numpy.linspace(1, 9, 9)? What would be even nicer would be to be able to retrieve a lambda using numpy functions for g as a function of x (that way I don't have the overhead of numpifying it each time I want to apply it to an array).
reckoner reckoner

[Tutor] is "fold" same as "reduce"? - 0 views

  • ### def reverse(l): return reduce(lambda x, y: [y] + x, [[]] + l) ###
  •  
    interesting use of redue

Bruno Piguet

Cookbook/FittingData - - 0 views

    • Bruno Piguet
       
      difference between fitfunc = lambda p, x: p[0]*cos(2*pi/p[1]*x+p[2]) + p[3]*x and def fitfunc (p, x): p[0]*cos(2*pi/p[1]*x+p[2]) + p[3]*x ???
1 - 5 of 5
Showing 20 items per page