You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So we can see the `QuantityArray` version saves on both time and memory.
366
366
367
+
By default, DynamicQuantities will create a `QuantityArray` from an `AbstractArray`, similarly to how a `Quantity` is created from a scalar in the [Usage](@ref) examples:
368
+
369
+
```@repl quantity-array
370
+
using DynamicQuantities # hide
371
+
372
+
x = [0.3, 0.4, 0.5]u"km/s"
373
+
374
+
y = (42:45) * u"kg"
375
+
```
376
+
377
+
This can be overridden to produce a vector of `Quantity`s by explicitly broadcasting the unit:
378
+
379
+
```@repl quantity-array
380
+
z = [0.3, 0.4, 0.5] .* u"km/s"
381
+
```
382
+
367
383
### Unitful
368
384
369
385
DynamicQuantities allows you to convert back and forth from Unitful.jl:
0 commit comments