Skip to content

Commit a13effb

Browse files
committed
Update namespace
1 parent 6685dbe commit a13effb

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

lib/node_modules/@stdlib/repl/lib/docs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,7 @@ module.exports = {
10361036
"ttest2": "\nttest2( x, y[, options] )\n Computes a two-sample Student's t test.\n\n By default, the function performs a two-sample t-test for the null\n hypothesis that the data in arrays or typed arrays `x` and `y` is\n independently drawn from normal distributions with equal means.\n\n The returned object comes with a `.print()` method which when invoked will\n print a formatted output of the results of the hypothesis test.\n\n Parameters\n ----------\n x: Array<number>\n First data array.\n\n y: Array<number>\n Second data array.\n\n options: Object (optional)\n Options.\n\n options.alpha: number (optional)\n Number in the interval `[0,1]` giving the significance level of the\n hypothesis test. Default: `0.05`.\n\n options.alternative: string (optional)\n Either `two-sided`, `less` or `greater`. Indicates whether the\n alternative hypothesis is that `x` has a larger mean than `y`\n (`greater`), `x` has a smaller mean than `y` (`less`) or the means are\n the same (`two-sided`). Default: `'two-sided'`.\n\n options.difference: number (optional)\n Number denoting the difference in means under the null hypothesis.\n Default: `0`.\n\n options.variance: string (optional)\n String indicating if the test should be conducted under the assumption\n that the unknown variances of the normal distributions are `equal` or\n `unequal`. As a default choice, the function carries out the Welch test\n (using the Satterthwaite approximation for the degrees of freedom),\n which does not have the requirement that the variances of the underlying\n distributions are equal. If the equal variances assumption seems\n warranted, set the option to `equal`. Default: `unequal`.\n\n Returns\n -------\n out: Object\n Test result object.\n\n out.alpha: number\n Used significance level.\n\n out.rejected: boolean\n Test decision.\n\n out.pValue: number\n P-value of the test.\n\n out.statistic: number\n Value of test statistic.\n\n out.ci: Array<number>\n 1-alpha confidence interval for the mean.\n\n out.nullValue: number\n Assumed difference in means under H0.\n\n out.xmean: number\n Sample mean of `x`.\n\n out.ymean: number\n Sample mean of `y`.\n\n out.alternative: string\n Alternative hypothesis (`two-sided`, `less` or `greater`).\n\n out.df: number\n Degrees of freedom.\n\n out.method: string\n Name of test.\n\n out.print: function\n Function to print formatted output.\n\n Examples\n --------\n // Student's sleep data:\n > var x = [ 0.7, -1.6, -0.2, -1.2, -0.1, 3.4, 3.7, 0.8, 0.0, 2.0 ];\n > var y = [ 1.9, 0.8, 1.1, 0.1, -0.1, 4.4, 5.5, 1.6, 4.6, 3.4 ];\n > var out = ttest2( x, y )\n {\n rejected: false,\n pValue: ~0.079,\n statistic: ~-1.861,\n ci: [ ~-3.365, ~0.205 ],\n // ...\n }\n\n // Print table output:\n > var table = out.print();\n Welch two-sample t-test\n\n Alternative hypothesis: True difference in means is not equal to 0\n\n pValue: 0.0794\n statistic: -1.8608\n 95% confidence interval: [-3.3655,0.2055]\n\n Test Decision: Fail to reject null in favor of alternative at 5%\n significance level\n\n // Choose a different significance level than `0.05`:\n > out = ttest2( x, y, { 'alpha': 0.1 });\n > table = out.print();\n Welch two-sample t-test\n\n Alternative hypothesis: True difference in means is not equal to 0\n\n pValue: 0.0794\n statistic: -1.8608\n 90% confidence interval: [-3.0534,-0.1066]\n\n Test Decision: Reject null in favor of alternative at 10% significance level\n\n // Perform one-sided tests:\n > out = ttest2( x, y, { 'alternative': 'less' });\n > table = out.print()\n Welch two-sample t-test\n\n Alternative hypothesis: True difference in means is less than 0\n\n pValue: 0.0397\n statistic: -1.8608\n df: 17.7765\n 95% confidence interval: [-Infinity,-0.1066]\n\n Test Decision: Reject null in favor of alternative at 5% significance level\n\n > out = ttest2( x, y, { 'alternative': 'greater' });\n > table = out.print()\n Welch two-sample t-test\n\n Alternative hypothesis: True difference in means is greater than 0\n\n pValue: 0.9603\n statistic: -1.8608\n df: 17.7765\n 95% confidence interval: [-3.0534,Infinity]\n\n Test Decision: Fail to reject null in favor of alternative at 5%\n significance level\n\n // Run tests with equal variances assumption:\n > x = [ 2, 3, 1, 4 ];\n > y = [ 1, 2, 3, 1, 2, 5, 3, 4 ];\n > out = ttest2( x, y, { 'variance': 'equal' });\n > table = out.print();\n Two-sample t-test\n\n Alternative hypothesis: True difference in means is not equal to 0\n\n pValue: 0.8848\n statistic: -0.1486\n df: 10\n 95% confidence interval: [-1.9996,1.7496]\n\n Test Decision: Fail to reject null in favor of alternative at 5%\n significance level\n\n // Test for a difference in means besides zero:\n > var rnorm = base.random.normal.factory({ 'seed': 372 });\n > x = new Array( 100 );\n > for ( i = 0; i < x.length; i++ ) {\n ... x[ i ] = rnorm( 2.0, 3.0 );\n ... }\n > y = new Array( 100 );\n > for ( i = 0; i < x.length; i++ ) {\n ... y[ i ] = rnorm( 1.0, 3.0 );\n ... }\n > out = ttest2( x, y, { 'difference': 1.0, 'variance': 'equal' })\n {\n rejected: false,\n pValue: ~0.642,\n statistic: ~-0.466,\n ci: [ ~-0.0455, ~1.646 ],\n // ...\n }\n\n See Also\n --------\n ttest\n",
10371037
"TWO_PI": "\nTWO_PI\n The mathematical constant `π` times `2`.\n\n Examples\n --------\n > TWO_PI\n 6.283185307179586\n\n See Also\n --------\n PI\n",
10381038
"typedarray2json": "\ntypedarray2json( arr )\n Returns a JSON representation of a typed array.\n\n The following typed array types are supported:\n\n - Float64Array\n - Float32Array\n - Int32Array\n - Uint32Array\n - Int16Array\n - Uint16Array\n - Int8Array\n - Uint8Array\n - Uint8ClampedArray\n\n The returned JSON object has the following properties:\n\n - type: typed array type\n - data: typed array data as a generic array\n\n The implementation supports custom typed arrays and sets the `type` field to\n the closest known typed array type.\n\n Parameters\n ----------\n arr: TypedArray\n Typed array to serialize.\n\n Returns\n -------\n out: Object\n JSON representation.\n\n Examples\n --------\n > var arr = new Float64Array( 2 );\n > arr[ 0 ] = 5.0;\n > arr[ 1 ] = 3.0;\n > var json = typedarray2json( arr )\n { 'type': 'Float64Array', 'data': [ 5.0, 3.0 ] }\n\n See Also\n --------\n reviveTypedArray\n",
1039+
"typedarray": "\ntypedarray( [dtype] )\n Creates a typed array.\n\n The function supports the following data types:\n\n - float64: double-precision floating-point numbers (IEEE 754)\n - float32: single-precision floating-point numbers (IEEE 754)\n - int32: 32-bit two's complement signed integers\n - uint32: 32-bit unsigned integers\n - int16: 16-bit two's complement signed integers\n - uint16: 16-bit unsigned integers\n - int8: 8-bit two's complement signed integers\n - uint8: 8-bit unsigned integers\n - uint8c: 8-bit unsigned integers clamped to 0-255\n\n The default typed array data type is `float64`.\n\n Parameters\n ----------\n dtype: string (optional)\n Data type. Default: 'float64'.\n\n Returns\n -------\n out: TypedArray\n A typed array.\n\n Examples\n --------\n > var arr = typedarray()\n <Float64Array>\n > arr = typedarray( 'float32' )\n <Float32Array>\n\n\ntypedarray( length[, dtype] )\n Returns a typed array having a specified length.\n\n Parameters\n ----------\n length: integer\n Typed array length.\n\n dtype: string (optional)\n Data type. Default: 'float64'.\n\n Returns\n -------\n out: TypedArray\n A typed array.\n\n Examples\n --------\n > var arr = typedarray( 5 )\n <Float64Array>[ 0.0, 0.0, 0.0, 0.0, 0.0 ]\n > arr = typedarray( 5, 'int32' )\n <Int32Array>[ 0, 0, 0, 0, 0 ]\n\n\ntypedarray( typedarray[, dtype] )\n Creates a typed array from another typed array.\n\n Parameters\n ----------\n typedarray: TypedArray\n Typed array from which to generate another typed array.\n\n dtype: string (optional)\n Data type. Default: 'float64'.\n\n Returns\n -------\n out: TypedArray\n A typed array.\n\n Examples\n --------\n > var arr1 = typedarray( [ 0.5, 0.5, 0.5 ] );\n > var arr2 = typedarray( arr1, 'float32' )\n <Float32Array>[ 0.5, 0.5, 0.5 ]\n\n\ntypedarray( obj[, dtype] )\n Creates a typed array from an array-like object or iterable.\n\n Parameters\n ----------\n obj: Object\n Array-like object or iterable from which to generate a typed array.\n\n dtype: string (optional)\n Data type. Default: 'float64'.\n\n Returns\n -------\n out: TypedArray\n A typed array.\n\n Examples\n --------\n > var arr1 = [ 0.5, 0.5, 0.5 ];\n > var arr2 = typedarray( arr1, 'float32' )\n <Float32Array>[ 0.5, 0.5, 0.5 ]\n\n\ntypedarray( buffer[, byteOffset[, length]][, dtype] )\n Returns a typed array view of an ArrayBuffer.\n\n Parameters\n ----------\n buffer: ArrayBuffer\n Underlying ArrayBuffer.\n\n byteOffset: integer (optional)\n Integer byte offset specifying the location of the first typed array\n element. Default: 0.\n\n length: integer (optional)\n View length. If not provided, the view spans from the byteOffset to\n the end of the underlying ArrayBuffer.\n\n dtype: string (optional)\n Data type. Default: 'float64'.\n\n Returns\n -------\n out: TypedArray\n A typed array.\n\n Examples\n --------\n > var buf = new ArrayBuffer( 16 );\n > var arr = typedarray( buf, 0, 4, 'float32' )\n <Float32Array>[ 0.0, 0.0, 0.0, 0.0 ]\n\n See Also\n --------\n Float64Array, Float32Array, Int32Array, Uint32Array, Int16Array, Uint16Array, Int8Array, Uint8Array, Uint8ClampedArray\n",
10391040
"typeOf": "\ntypeOf( value )\n Determines a value's type.\n\n The following values are not natively provided in older JavaScript engines:\n\n - Map\n - Set\n - WeakMap\n - WeakSet\n - Symbol\n\n Parameters\n ----------\n value: any\n Input value.\n\n Returns\n -------\n out: string\n The value's type.\n\n Examples\n --------\n // Built-ins:\n > var t = typeOf( 'a' )\n 'string'\n > t = typeOf( 5 )\n 'number'\n > t = typeOf( NaN )\n 'number'\n > t = typeOf( true )\n 'boolean'\n > t = typeOf( false )\n 'boolean'\n > t = typeOf( null )\n 'null'\n > t = typeOf( undefined )\n 'undefined'\n > t = typeOf( [] )\n 'array'\n > t = typeOf( {} )\n 'object'\n > t = typeOf( function noop() {} )\n 'function'\n > t = typeOf( new Symbol( 'beep' ) )\n 'symbol'\n > t = typeOf( /.+/ )\n 'regexp'\n > t = typeOf( new String( 'beep' ) )\n 'string'\n > t = typeOf( new Number( 5 ) )\n 'number'\n > t = typeOf( new Boolean( false ) )\n 'boolean'\n > t = typeOf( new Array() )\n 'array'\n > t = typeOf( new Object() )\n 'object'\n > t = typeOf( new Int8Array( 10 ) )\n 'int8array'\n > t = typeOf( new Uint8Array( 10 ) )\n 'uint8array'\n > t = typeOf( new Uint8ClampedArray( 10 ) )\n 'uint8clampedarray'\n > t = typeOf( new Int16Array( 10 ) )\n 'int16array'\n > t = typeOf( new Uint16Array( 10 ) )\n 'uint16array'\n > t = typeOf( new Int32Array( 10 ) )\n 'int32array'\n > t = typeOf( new Uint32Array( 10 ) )\n 'uint32array'\n > t = typeOf( new Float32Array( 10 ) )\n 'float32array'\n > t = typeOf( new Float64Array( 10 ) )\n 'float64array'\n > t = typeOf( new ArrayBuffer( 10 ) )\n 'arraybuffer'\n > t = typeOf( new Date() )\n 'date'\n > t = typeOf( new RegExp( '.+ )') )\n 'regexp'\n > t = typeOf( new Map() )\n 'map'\n > t = typeOf( new Set() )\n 'set'\n > t = typeOf( new WeakMap() )\n 'weakmap'\n > t = typeOf( new WeakSet() )\n 'weakset'\n > t = typeOf( new Error( 'beep' ) )\n 'error'\n > t = typeOf( new TypeError( 'beep' ) )\n 'typeerror'\n > t = typeOf( new SyntaxError( 'beep' ) )\n 'syntaxerror'\n > t = typeOf( new ReferenceError( 'beep' ) )\n 'referenceerror'\n > t = typeOf( new URIError( 'beep' ) )\n 'urierror'\n > t = typeOf( new RangeError( 'beep' ) )\n 'rangeerror'\n > t = typeOf( new EvalError( 'beep' ) )\n 'evalerror'\n > t = typeOf( Math )\n 'math'\n > t = typeOf( JSON )\n 'json'\n\n // Arguments object:\n > function beep() { return arguments; };\n > t = typeOf( beep() )\n 'arguments'\n\n // Node.js Buffer object:\n > t = typeOf( new Buffer( 10 ) )\n 'buffer'\n\n // Custom constructor:\n > function Person() { return this };\n > t = typeOf( new Person() )\n 'person'\n\n // Anonymous constructor:\n > var Foo = function () { return this; };\n > t = typeOf new Foo() )\n ''\n\n See Also\n --------\n constructorName, nativeClass\n",
10401041
"Uint16Array": "\nUint16Array()\n A typed array constructor which returns a typed array representing an array\n of 16-bit unsigned integers in the platform byte order.\n\n Returns\n -------\n out: Uint16Array\n A typed array.\n\n Examples\n --------\n > var arr = new Uint16Array()\n <Uint16Array>\n\n\nUint16Array( length )\n Returns a typed array having a specified length.\n\n Parameters\n ----------\n length: integer\n Typed array length.\n\n Returns\n -------\n out: Uint16Array\n A typed array.\n\n Examples\n --------\n > var arr = new Uint16Array( 5 )\n <Uint16Array>[ 0, 0, 0, 0, 0 ]\n\n\nUint16Array( typedarray )\n Creates a typed array from another typed array.\n\n Parameters\n ----------\n typedarray: TypedArray\n Typed array from which to generate another typed array.\n\n Returns\n -------\n out: Uint16Array\n A typed array.\n\n Examples\n --------\n > var arr1 = new Int32Array( [ 5, 5, 5 ] );\n > var arr2 = new Uint16Array( arr1 )\n <Uint16Array>[ 5, 5, 5 ]\n\n\nUint16Array( obj )\n Creates a typed array from an array-like object or iterable.\n\n Parameters\n ----------\n obj: Object\n Array-like object or iterable from which to generate a typed array.\n\n Returns\n -------\n out: Uint16Array\n A typed array.\n\n Examples\n --------\n > var arr1 = [ 5.0, 5.0, 5.0 ];\n > var arr2 = new Uint16Array( arr1 )\n <Uint16Array>[ 5, 5, 5 ]\n\n\nUint16Array( buffer[, byteOffset[, length]] )\n Returns a typed array view of an ArrayBuffer.\n\n Parameters\n ----------\n buffer: ArrayBuffer\n Underlying ArrayBuffer.\n\n byteOffset: integer (optional)\n Integer byte offset specifying the location of the first typed array\n element. Default: 0.\n\n length: integer (optional)\n View length. If not provided, the view spans from the byteOffset to\n the end of the underlying ArrayBuffer.\n\n Returns\n -------\n out: Uint16Array\n A typed array.\n\n Examples\n --------\n > var buf = new ArrayBuffer( 8 );\n > var arr = new Uint16Array( buf, 0, 4 )\n <Uint16Array>[ 0, 0, 0, 0 ]\n\n\nUint16Array.BYTES_PER_ELEMENT\n Number of bytes per view element.\n\n Examples\n --------\n > Uint16Array.BYTES_PER_ELEMENT\n 2\n\n\nUint16Array.name\n Typed array constructor name.\n\n Examples\n --------\n > Uint16Array.name\n Uint16Array\n\n\nUint16Array.prototype.buffer\n Read-only property which returns the ArrayBuffer referenced by the typed\n array.\n\n Examples\n --------\n > var arr = new Uint16Array( 5 );\n > arr.buffer\n <ArrayBuffer>\n\n\nUint16Array.prototype.byteLength\n Read-only property which returns the length (in bytes) of the typed array.\n\n Examples\n --------\n > var arr = new Uint16Array( 5 );\n > arr.byteLength\n 10\n\n\nUint16Array.prototype.byteOffset\n Read-only property which returns the offset (in bytes) of the typed array\n from the start of its ArrayBuffer.\n\n Examples\n --------\n > var arr = new Uint16Array( 5 );\n > arr.byteOffset\n 0\n\n\nUint16Array.prototype.length\n Read-only property which returns the number of view elements.\n\n Examples\n --------\n > var arr = new Uint16Array( 5 );\n > arr.length\n 5\n\n\nTODO: add methods\n\n\n See Also\n --------\n Float32Array, Float64Array, Int16Array, Int32Array, Int8Array, Uint32Array, Uint8Array, Uint8ClampedArray\n",
10411042
"UINT16_MAX": "\nUINT16_MAX\n Maximum unsigned 16-bit integer.\n\n The maximum unsigned 16-bit integer is given by `2^16 - 1`.\n\n Examples\n --------\n > UINT16_MAX\n 65535\n\n See Also\n --------\n INT16_MAX\n",

0 commit comments

Comments
 (0)