Skip to content

Commit 7536870

Browse files
committed
docs: fix example and update docs
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent f22a9ab commit 7536870

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/node_modules/@stdlib/ndarray/ctor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ struct ndarray * stdlib_ndarray_allocate( int16_t dtype, uint8_t *data, int64_t
880880
Notes:
881881

882882
- The user is responsible for freeing the allocated memory.
883-
- To allocate a zero-dimensional ndarray, provide a `shape` argument equal to `NULL`, an `ndims` argument equal to `0`, and a `strides` argument consisting of a single element equal to `0`. The `order` argument can be either row-major or column-major and has no effect on data storage or access.
883+
- To allocate a zero-dimensional ndarray, provide a `shape` argument equal to a null pointer, an `ndims` argument equal to `0`, and a `strides` argument consisting of a single element equal to `0`. The `order` argument can be either row-major or column-major and has no effect on data storage or access.
884884

885885
#### stdlib_ndarray_bytelength( \*arr )
886886

lib/node_modules/@stdlib/ndarray/ctor/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
* - To create a zero-dimensional array,
4141
*
4242
* - provide an `ndims` argument equal to `0`.
43-
* - a `shape` argument equal to `NULL`.
43+
* - a `shape` argument equal to a null pointer.
4444
* - a `strides` argument containing a single element equal to `0`.
4545
*
4646
* The `order` argument can be either row-major or column-major and has no effect on data storage or access.
@@ -53,7 +53,7 @@
5353
* #include <stdint.h>
5454
*
5555
* uint8_t buffer[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
56-
* int64_t shape[] = NULL;
56+
* int64_t *shape = NULL;
5757
* int64_t strides = { 0 };
5858
* int64_t offset = 0;
5959
*

0 commit comments

Comments
 (0)