-
Notifications
You must be signed in to change notification settings - Fork 185
[stdlib_linalg] Add zeros, ones function. #478
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
Conversation
`reshape` function is not compatible with `string_type` type in some compilers
The existing grammar of |
1. automatic array -> allocatable array. 2. the name: `ex` -> `expand`. 3. update stdlib_linalg.md related docs.
I will review this one. |
@@ -81,7 +81,8 @@ stdlib_io.o: \ | |||
stdlib_optval.o \ | |||
stdlib_kinds.o | |||
stdlib_linalg.o: \ | |||
stdlib_kinds.o | |||
stdlib_kinds.o \ | |||
stdlib_string_type.o |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, later I will remove this dependency stdlib_string_type.o
(There is no need here, it is a wrong).
int8, int16, int32, int64, lk, c_bool | ||
use stdlib_string_type, only: string_type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto (lk, c_bool, string_type
)
Hi @zoziha Thanks for the pull request. I just started looking at this, and think it might be useful to have more discussion about the use-cases of these routines in the context of Fortran. To me there are a couple of situations to consider:
This is all I could think of -- and it did make me question whether |
Thank you @gareth-nx and everyone who reviewed this PR , I think what you @gareth-nx said makes sense, and I agree to cancel this PR.
real, allocatable :: array(:, :)
array = ones(2, 2)
array = ones(3, 4)
---
allocate(array(2, 2), source=1)
deallocate(array)
allocate(array(3, 4), source=1) Now it seems that it is not necessary. Fortran itself can handle these well, and |
zeros
function;ones
function;More routines to do, not this PR
see #476.