Releases: emmt/StructuredArrays.jl
v0.2.22
StructuredArrays v0.2.22
-
Operations on Cartesian meshes: multiplication or division by a scalar, adjust by adding/subtracting tuple of offsets.
-
New trait functions
TypeUtils.step_type
andTypeUtils.origin_type
to retrieve the types of a mesh step and origin. -
Optimize comparisons of uniform arrays via
isequal
,==
, andcmp
. -
Optimize mapping and broadcasting of functions for uniform arrays.
-
Use
TypeUtils.@public
to declare aspublic
some documented but non-exported symbols.
Merged pull requests:
- Bump codecov/codecov-action from 4 to 5 (#5) (@dependabot[bot])
v0.2.21
v0.2.20
StructuredArrays v0.2.20
- Constructor
FastUniformArray{T,N,V}(args...)
can be used to build a fast uniform array whose elements are all equal toV
.V isa T
must hold.
v0.2.19
StructuredArrays v0.2.19
Main changes:
-
New Cartesian meshes as callable (function-like) objects or as abstract arrays. These objects yields the Cartesian coordinates of the nodes of the mesh given their indices.
-
Array
andOffsetArray
may be called to convert a uniform or a structured array into a mutable array with the same axes.
Other changes:
-
For uniform arrays
A
,show(A)
prints an expression that is valid Julia code. -
Add
OffsetArrays
dependency so thatsimilar(A,...)
works as expected for structured arrays that may have offset axes. It yields an ordinaryArray
if it can be inferred from the types of the arguments that the resulting array has no offset axes and anOffsetArray
otherwise. -
Array shape parameters of type
Base.OneTo
are converted to their lengths. -
Non-exported method
StructuredArrays.shape
can be used to retrieve the shape of an array. -
Improved constructors for: speed and allocations (with
@benchmark
), type inference (with@code_warntype
), and code clarity. -
Speedup
foreach
for small tuples (≤ 32 entries) in Julia < 1.8. -
Optimized reduction methods for uniform arrays (
extrema
,findmax
, etc.) have been fixed to yield consistent results when axes have offsets. In particular, anAbstractUniformArray
and anOffsetArray
filled with the same value should yields comparable results.
v0.2.18
StructuredArrays v0.2.18
- Private methods
to_dim
,to_axis
,to_size
, andto_axes
have been replaced byas_array_dim
,as_array_axis
,as_array_size
, andas_array_axes
provided byTypeUtils
(version ≥ 1.4).
v0.2.17
StructuredArrays v0.2.17
- For a uniform or structured array
A
,copy(A)
anddeepcopy(A)
simply yieldA
if it is immutable. - Axes specified as instances of
Base.OneTo
are stored by length.
v0.2.16
StructuredArrays v0.2.16
- Fix constructors for vector/matrix aliases of structured arrays.
v0.2.15
v0.2.14
StructuredArrays v0.2.14
-
Optimize methods
reverse
andunique
for uniform arrays. -
Ordinal ranges may be used to define axes provided they have unit-step.
-
Axes of structured arrays may be specified as a mixture of integers (assumed to be dimension lengths) and integer-valued unit-ranges.
v0.2.13
StructuredArrays v0.2.13
- Optimize reductions operations
minimum
,maximum
,extrema
,all
,any
,sum
,prod
,count
,findmin
, andfindmax
for uniform arrays with syntaxop([f=identity], A; dims=:)
whereop
is the reduction operation,f
is an optional function,A
is a uniform array, and keyworddims
is the list of dimensions over which to reduce (all by default). As a result, these operations are much faster for uniform arrays with a number of operations scaling asO(1)
instead ofO(length(A))
.