Skip to content

rwiturralde/serverless-numpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless NumPy

Simple AWS Lambda function that wraps the popular python library, NumPy.

Usage

Input

The AWS Lambda function event expects an JSON dictionary with two entries: 'method' and 'arguments'.

  • method - String - The name of the NumPy method to invoke
  • arguments - Array - An ordered array of arguments to pass to the method.
{
  "method": "some_method",
  "arguments": [
    1,
    2,
    3
  ]
}

Output

The return JSON dictionary will contain a single entry: 'result' holding the result of the computation. If an error occurs, the function will return the AWS Lambda error object.

{
  "result": 123.456
}

Examples

Computing future value

{
  "method": "fv",
  "arguments": [
    0.004166666666666666,
    120,
    -100,
    -100
  ]
}

Computing the net present value of a cash flow series.

{
  "method": "npv",
  "arguments": [
    0.281,
    [
      -100,
      39,
      59,
      55,
      20
    ]
  ]
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages