Skip to content

feat: add blas/base/matrix-triangle-str2enum & blas/base/matrix-triangle/enum2str #2495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jul 4, 2024

Conversation

Pranavchiku
Copy link
Member

Description

What is the purpose of this pull request?

This pull request adds implementation for blas/base/matrix-triangle-str2enum & blas/base/matrix-triangle/enum2str

Checklist

Please ensure the following tasks are completed before submitting this pull request.


@stdlib-js/reviewers

@Pranavchiku Pranavchiku added the BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). label Jul 2, 2024
@Pranavchiku
Copy link
Member Author

Repl Lint Failure happens in matrix-triangle-enum2str:

This happens even if I copy and use https://github.com/stdlib-js/stdlib/blob/develop/lib/node_modules/%40stdlib/blas/base/transpose-operation-enum2str/docs/repl.txt exact same with no modifications.

% git commit -m "chore: add docs/repl.txt"
/Users/pranavchiku/repos/stdlib-js/stdlib/lib/node_modules/@stdlib/_tools/repl-txt/rules/doctest/lib/main.js:175
			alias = alias.split( '.' );
			              ^

TypeError: Cannot read properties of null (reading 'split')
    at replaceAliases (/Users/pranavchiku/repos/stdlib-js/stdlib/lib/node_modules/@stdlib/_tools/repl-txt/rules/doctest/lib/main.js:175:18)
    at String.replace (<anonymous>)
    at replace (/Users/pranavchiku/repos/stdlib-js/stdlib/lib/node_modules/@stdlib/string/base/replace/lib/main.js:49:13)
    at replace (/Users/pranavchiku/repos/stdlib-js/stdlib/lib/node_modules/@stdlib/string/replace/lib/main.js:78:9)
    at Object.returnValues [as validate] (/Users/pranavchiku/repos/stdlib-js/stdlib/lib/node_modules/@stdlib/_tools/repl-txt/rules/doctest/lib/main.js:131:12)
    at Linter.validate (/Users/pranavchiku/repos/stdlib-js/stdlib/lib/node_modules/@stdlib/_tools/repl-txt/validate/lib/validate.js:110:32)
    at isValid (/Users/pranavchiku/repos/stdlib-js/stdlib/lib/node_modules/@stdlib/_tools/repl-txt/validate/lib/main.js:42:9)
    at onRead (/Users/pranavchiku/repos/stdlib-js/stdlib/lib/node_modules/@stdlib/_tools/lint/repl-txt/lib/lint.js:93:11)
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read/context:68:3)

Node.js v20.9.0

REPL help lint errors.

Copy link
Member Author

@Pranavchiku Pranavchiku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done by copy pasting files from corresponding transpose-operation-* using cp -r transpose-operation-enum2str/* matrix-triangle-enum2str/ and then find and replace. I am not sure why we have lint error in repl.txt for enum2str.

@Pranavchiku
Copy link
Member Author

The trouble is in line > var out = {{alias}}( {{alias:@stdlib/blas/base/matrix-triangle-str2enum}}( 'upper' ) ), with the following diff it works:

--- a/lib/node_modules/@stdlib/blas/base/matrix-triangle-enum2str/docs/repl.txt
+++ b/lib/node_modules/@stdlib/blas/base/matrix-triangle-enum2str/docs/repl.txt
@@ -15,7 +15,7 @@
 
     Examples
     --------
-    > var out = {{alias}}( {{alias:@stdlib/blas/base/matrix-triangle-str2enum}}( 'upper' ) )
+    > var out = {{alias}}( 121 )
     'upper'
 
     See Also

@kgryte
Copy link
Member

kgryte commented Jul 2, 2024

@Pranavchiku This lint error is expected. The package is not yet in the REPL namespace. We can ignore for now.

@kgryte kgryte added the Feature Issue or pull request for adding a new feature. label Jul 4, 2024
Copy link
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks, @Pranavchiku!

@kgryte kgryte merged commit a61b40c into stdlib-js:develop Jul 4, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). Feature Issue or pull request for adding a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants