- Source:
This module contains functions used to check variable type.
Methods
(static) allignArguments(funcCall) → {String}
- Source:
- To Do:
-
- Reconsider
Prettify arguments passing.
Example
let funcCall = 'python_fuction(arg1=arg1\narg2=arg2\narg3=arg3)';
allignArguments(funcCall)
// python_fuction(arg1=arg1
// arg2=arg2
// arg3=arg3)
Parameters:
Name | Type | Description |
---|---|---|
funcCall |
String | call as string. |
Returns:
Pretty call.
- Type
- String
(static) computeConvOutputLength(args) → {number}
- Source:
Determines output length of a convolution given input length. Based on Keras
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
args |
Object | Arguments used to compute output length. Properties
|
Returns:
The output length.
- Type
- number
(static) getName(prefix) → {string}
- Source:
Get a name with prefix
. If prefix
hasn't used yet, returns prefix
. If it is used, return name with prefix
and number of occurrences.
Example
getName('myname'); // 'myname'
getName('myname'); // 'myname_1'
getName('myname'); // 'myname_2'
getName('myname'); // 'myname_3'
getName('myname'); // 'myname_4'
Parameters:
Name | Type | Description |
---|---|---|
prefix |
string | Prefix of the name. |
Returns:
Generated name from name pool.
- Type
- string
(static) toString(mvalue) → {Any}
- Source:
Convert JS variable to Python variable.
Example
toString(1) // '1'
toString(true) // 'True'
toString(false) // 'False'
toString(null) // 'None'
toString(undefined) // 'None'
toString([1, 2, 3]) // '[1, 2, 3]'
toString([1, true, null, 'hi']) // '[1, True, None, 'hi']'
toString('string') // 'string'
Parameters:
Name | Type | Description |
---|---|---|
mvalue |
Any | JS value. |
Returns:
Python value as string.
- Type
- Any