Python REST client module#
Python implementation of the REST API Eigen example client.
- class ansys.eigen.python.rest.client.DemoRESTClient(host, port, user=None, pwd=None, client=None)[source]#
Bases:
object
Acts as a client to the service provided by the API REST server of this same project. This class has several public methods that allow for direct interaction with the server, without having to care about the formatting of the RESTful queries.
- add(arg1, arg2)[source]#
Add two numpy.ndarrays using the Eigen library (C++), which is exposed via the destination RESTful server.
- Parameters:
- arg1
numpy.ndarray
First numpy.ndarray to consider in the operation.
- arg2
numpy.ndarray
Second numpy.ndarray to consider in the operation.
- arg1
- Returns:
numpy.ndarray
Sum of adding arg1 and arg2 (arg1 + arg2).
- multiply(arg1, arg2)[source]#
Multiply two numpy.ndarrays using the Eigen library (C++), which is exposed via the destination RESTful server.
- Parameters:
- arg1
numpy.ndarray
First numpy.ndarray to consider in the operation.
- arg2
numpy.ndarray
Second numpy.ndarray to consider in the operation.
- arg1
- Returns:
numpy.ndarray
The result of multiplyng arg1 and arg2 (arg1 * arg2).
- subtract(arg1, arg2)[source]#
Subtract two numpy.ndarrays using the Eigen library (C++), which is exposed via the destination RESTful server.
- Parameters:
- arg1
numpy.ndarray
First numpy.ndarray to consider in the operation.
- arg2
numpy.ndarray
Second numpy.ndarray to consider in the operation.
- arg1
- Returns:
numpy.ndarray
The result of subtracting arg2 from arg1 (arg1 - arg2).