@stdlib/ndarray-base-napi-dtype-string-to-dtype

C API for returning the ndarray data type corresponding to a data type string.

https://github.com/stdlib-js/ndarray-base-napi-dtype-string-to-dtype

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.2%) to scientific vocabulary

Keywords

base dtype javascript napi ndarray node node-js nodejs stdlib string types
Last synced: 6 months ago · JSON representation

Repository

C API for returning the ndarray data type corresponding to a data type string.

Basic Info
Statistics
  • Stars: 2
  • Watchers: 3
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
base dtype javascript napi ndarray node node-js nodejs stdlib string types
Created over 4 years ago · Last pushed 11 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Security

README.md

About stdlib...

We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.

The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.

When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.

To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!

Node-API ndarray dtype

NPM version Build Status Coverage Status <!-- dependencies -->

C API for returning the ndarray data type corresponding to a data type string.

## Installation ```bash npm install @stdlib/ndarray-base-napi-dtype-string-to-dtype ```
## Usage ```c #include "stdlib/ndarray/base/napi/dtype_string_to_dtype.h" ``` #### stdlib_ndarray_napi_dtype_string_to_dtype( const char \*str ) Returns the ndarray [data type][@stdlib/ndarray/dtypes] corresponding to a data type string. ```cpp #include "stdlib/ndarray/base/napi/dtype_string_to_dtype.h" #include "stdlib/ndarray/dtypes.h" #include #include // Add-on function export... napi_value addon( napi_env env, napi_callback_info info ) { // ... // Get function arguments... size_t argc = 1; napi_value argv[ 1 ]; napi_status status = napi_get_cb_info( env, info, &argc, argv, nullptr, nullptr ); assert( status == napi_ok ); // ... // Get a string argument... char str[ 1024 ]; size_t len; status = napi_get_value_string_utf8( env, argv[ 0 ], (char *)str, 1024, &len ); assert( status == napi_ok ); // ... // Return the corresponding ndarray data type for the input typed array: enum STDLIB_NDARRAY_DTYPE dtype = stdlib_ndarray_napi_dtype_string_to_dtype( str ); // ... } ```
* * * ## Notice This package is part of [stdlib][stdlib], a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more. For more information on the project, filing bug reports and feature requests, and guidance on how to develop [stdlib][stdlib], see the main project [repository][stdlib]. #### Community [![Chat][chat-image]][chat-url] --- ## License See [LICENSE][stdlib-license]. ## Copyright Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors].

Owner

  • Name: stdlib
  • Login: stdlib-js
  • Kind: organization

Standard library for JavaScript.

GitHub Events

Total
  • Push event: 3
Last Year
  • Push event: 3

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 51
  • Total Committers: 1
  • Avg Commits per committer: 51.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 14
  • Committers: 1
  • Avg Commits per committer: 14.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
stdlib-bot n****y@s****o 51
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • npm 17 last-month
  • Total dependent packages: 2
  • Total dependent repositories: 0
  • Total versions: 13
  • Total maintainers: 4
npmjs.org: @stdlib/ndarray-base-napi-dtype-string-to-dtype

C API for returning the ndarray data type corresponding to a data type string.

  • Homepage: https://stdlib.io
  • License: Apache-2.0
  • Latest release: 0.2.2
    published over 1 year ago
  • Versions: 13
  • Dependent Packages: 2
  • Dependent Repositories: 0
  • Downloads: 17 Last month
Rankings
Dependent packages count: 9.5%
Downloads: 12.6%
Average: 16.3%
Stargazers count: 16.8%
Forks count: 17.4%
Dependent repos count: 25.3%
Funding
  • type: opencollective
  • url: https://opencollective.com/stdlib
Last synced: 6 months ago

Dependencies

package.json npm
  • @stdlib/assert-is-browser ^0.0.x development
  • istanbul ^0.4.1 development
  • tap-spec 5.x.x development
  • tape git+https://github.com/kgryte/tape.git#fix/globby development
  • @stdlib/ndarray-dtypes ^0.0.x
  • @stdlib/utils-library-manifest ^0.0.x
.github/workflows/cancel.yml actions
  • styfle/cancel-workflow-action 0.11.0 composite
.github/workflows/close_pull_requests.yml actions
  • superbrothers/close-pull-request v3 composite
.github/workflows/npm_downloads.yml actions
  • actions/checkout v3 composite
  • actions/setup-node v3 composite
  • actions/upload-artifact v3 composite
  • distributhor/workflow-webhook v3 composite
.github/workflows/publish.yml actions
  • JS-DevTools/npm-publish v1 composite
  • act10ns/slack v1 composite
  • actions/checkout v3 composite
  • actions/setup-node v3 composite
  • styfle/cancel-workflow-action 0.11.0 composite
.github/workflows/test.yml actions
  • act10ns/slack v1 composite
  • actions/checkout v3 composite
  • actions/setup-node v3 composite
.github/workflows/test_coverage.yml actions
  • act10ns/slack v1 composite
  • actions/checkout v3 composite
  • actions/setup-node v3 composite
  • codecov/codecov-action v3 composite
  • distributhor/workflow-webhook v3 composite
.github/workflows/test_install.yml actions
  • act10ns/slack v1 composite
  • actions/checkout v3 composite
  • actions/setup-node v3 composite