SF_ARRAYS
Description
SciFortran module for array creation and manipulation
Quick access
- Routines:
linspace()
,logspace()
,arange()
,upminterval()
,upmspace()
,powspace()
Subroutines and functions
- function sf_arrays/linspace(start, stop, num[, istart, iend, mesh])
Returns an array of evenly spaced numbers over a specified interval. Returns
num
evenly spaced samples, calculated over the interval [start
,stop
]. The start and end points of the interval can optionally be excluded.- Parameters:
start [real] – Starting value of the sequence
stop [real] – End value of the sequence
num [integer] – Number of samples to generated
- Options:
istart [logical] – If
.true.
,start
is included in the resulting array. Default.true.
iend [logical] – If
.true.
,stop
is included in the resulting array. Default.true.
mesh [real] – If present, the step is saved in this variable
- Return:
array (num) [real] – Contains
num
equally spaced samples in the interval [start
,stop
], left/right open or closed depending onistart
andiend
- function sf_arrays/logspace(start, stop, num[, base])
Return numbers spaced evenly on a log scale. In linear space, the sequence starts at \({start}\) and ends with \({stop}\) (differently from numpy).
- Parameters:
start [real] – The starting value of the sequence. Must be positive. If set to
0
, it will be reshifted to1e-12
stop [real] – The end value of the sequence. Must be positive. If set to
0
, it will be reshifted to1e-12
num [integer] – Number of samples to generate
- Options:
base [real] – The base of the exponential. Default
10
- Return:
array (num) [real] – Contains
num
samples, equally spaced on a log scale in the closed interval [start, stop]
- function sf_arrays/arange(start, num)
Returns an array of
num
integers starting withstart
- Parameters:
start [integer] – First element of the array
num [integer] – Length of the array
- Return:
array (num) [integer] – Contains the integer numbers in [
start
,start
+
num
-1
]
- function sf_arrays/upminterval(start, stop, midpoint, p, q[, type, base, mesh])
- Parameters:
start [real]
stop [real]
midpoint [real]
p [integer, in,required]
q [integer, in,required]
- Options:
type [integer]
base [real]
mesh (1 + 2 · p · q) [real]
- Return:
array (1 + 2 · p · q) [real]
- function sf_arrays/upmspace(start, stop, p, u, ndim[, base, istart, iend, mesh])
- Parameters:
start [real]
stop [real]
p [integer]
u [integer]
- Options:
ndim [integer]
base [real]
istart [logical]
iend [logical]
mesh (ndim) [real]
- Return:
aout (ndim) [real]
- function sf_arrays/powspace(start, stop, num[, base])
- Parameters:
start [real]
stop [real]
num [integer]
- Options:
base [real]
- Return:
array (num) [real]