|
| 1 | +<!-- |
| 2 | +
|
| 3 | +@license Apache-2.0 |
| 4 | +
|
| 5 | +Copyright (c) 2023 The Stdlib Authors. |
| 6 | +
|
| 7 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | +you may not use this file except in compliance with the License. |
| 9 | +You may obtain a copy of the License at |
| 10 | +
|
| 11 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +
|
| 13 | +Unless required by applicable law or agreed to in writing, software |
| 14 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | +See the License for the specific language governing permissions and |
| 17 | +limitations under the License. |
| 18 | +
|
| 19 | +--> |
| 20 | + |
| 21 | +# filled2d |
| 22 | + |
| 23 | +> Create a filled two-dimensional nested array. |
| 24 | +
|
| 25 | +<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. --> |
| 26 | + |
| 27 | +<section class="intro"> |
| 28 | + |
| 29 | +</section> |
| 30 | + |
| 31 | +<!-- /.intro --> |
| 32 | + |
| 33 | +<!-- Package usage documentation. --> |
| 34 | + |
| 35 | +<section class="usage"> |
| 36 | + |
| 37 | +## Usage |
| 38 | + |
| 39 | +```javascript |
| 40 | +var filled2d = require( '@stdlib/array/base/filled2d' ); |
| 41 | +``` |
| 42 | + |
| 43 | +#### filled2d( value, shape ) |
| 44 | + |
| 45 | +Returns a filled two-dimensional nested array. |
| 46 | + |
| 47 | +```javascript |
| 48 | +var out = filled2d( 0.0, [ 2, 3 ] ); |
| 49 | +// returns [ [ 0.0, 0.0, 0.0 ], [ 0.0, 0.0, 0.0 ] ] |
| 50 | +``` |
| 51 | + |
| 52 | +</section> |
| 53 | + |
| 54 | +<!-- /.usage --> |
| 55 | + |
| 56 | +<!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> |
| 57 | + |
| 58 | +<section class="notes"> |
| 59 | + |
| 60 | +</section> |
| 61 | + |
| 62 | +<!-- /.notes --> |
| 63 | + |
| 64 | +<!-- Package usage examples. --> |
| 65 | + |
| 66 | +<section class="examples"> |
| 67 | + |
| 68 | +## Examples |
| 69 | + |
| 70 | +<!-- eslint no-undef: "error" --> |
| 71 | + |
| 72 | +```javascript |
| 73 | +var filled2d = require( '@stdlib/array/base/filled2d' ); |
| 74 | + |
| 75 | +var out = filled2d( 0.0, [ 1, 3 ] ); |
| 76 | +// returns [ [ 0.0, 0.0, 0.0 ] ] |
| 77 | + |
| 78 | +out = filled2d( 'beep', [ 3, 1 ] ); |
| 79 | +// returns [ [ 'beep' ], [ 'beep' ], [ 'beep' ] ] |
| 80 | + |
| 81 | +out = filled2d( null, [ 1, 3 ] ); |
| 82 | +// returns [ [ null, null, null ] ] |
| 83 | + |
| 84 | +out = filled2d( true, [ 3, 1 ] ); |
| 85 | +// returns [ [ true ], [ true ], [ true ] ] |
| 86 | + |
| 87 | +out = filled2d( void 0, [ 1, 3 ] ); |
| 88 | +// returns [ [ undefined, undefined, undefined ] ] |
| 89 | +``` |
| 90 | + |
| 91 | +</section> |
| 92 | + |
| 93 | +<!-- /.examples --> |
| 94 | + |
| 95 | +<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> |
| 96 | + |
| 97 | +<section class="references"> |
| 98 | + |
| 99 | +</section> |
| 100 | + |
| 101 | +<!-- /.references --> |
| 102 | + |
| 103 | +<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. --> |
| 104 | + |
| 105 | +<section class="related"> |
| 106 | + |
| 107 | +</section> |
| 108 | + |
| 109 | +<!-- /.related --> |
| 110 | + |
| 111 | +<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. --> |
| 112 | + |
| 113 | +<section class="links"> |
| 114 | + |
| 115 | +</section> |
| 116 | + |
| 117 | +<!-- /.links --> |
0 commit comments