Jim-Holmstroem / pickleable

pickle a subset of functions in python
GNU General Public License v2.0
0 stars 0 forks source link

allow for some context in lambda_ #1

Open Jim-Holmstroem opened 9 years ago

Jim-Holmstroem commented 9 years ago

Important to be able to use some predefined modules like np/pd/datetime or whatever in lambdas

Jim-Holmstroem commented 9 years ago
Lambda(lambda x: np.mean(x), context={'np': np})

This can of course be done without the np but this is just a demonstration