# \[ANN\] Numerics.jl – The Extended Standard Library

**URL:** <https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694>\
**Category:** Package Announcements\
**Created:** [June 3, 2020, 8:36pm UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694 "2020-06-03T20:36:55Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![djsegal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/djsegal/32/13752_2.png) [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Post date:** [June 3, 2020, 8:36pm UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/1 "2020-06-03T20:36:55Z")

</div>

Hi All,

Made a package that just reexports the 5 packages most common to Numerics:

- LinearAlgebra
- StatsBase
- Statistics
- DataFrames
- DataStructures

* * *

If you do:

```julia
] add Numerics
using Numerics

```

You now have access to `norm`, `std`, `mean`, etc. without having to remember which package they come from

// this came about by seeing common struggles from first-time julia users

---

<div class="post-metadata">

**Author:** ![tlienart](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tlienart/32/7640_2.png) [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Post date:** [June 3, 2020, 9:02pm UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/2 "2020-06-03T21:02:23Z")

</div>

Link: [GitHub - djsegal/Numerics.jl: Bundle of Julia Packages related to Numerics](https://github.com/djsegal/Numerics.jl)

---

<div class="post-metadata">

**Author:** ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Post date:** [June 3, 2020, 9:31pm UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/3 "2020-06-03T21:31:19Z")

</div>

Wondering if Random and Distributions should be included?

---

<div class="post-metadata">

**Author:** ![Orbots](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/orbots/32/3392_2.png) [@Orbots](https://discourse.julialang.org/u/Orbots)\
**Post date:** [June 3, 2020, 9:52pm UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/4 "2020-06-03T21:52:55Z")

</div>

using LinearAlgebra, StaticArrays, SparseArrays  
is the first thing I type when I open julia.

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [June 3, 2020, 11:36pm UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/5 "2020-06-03T23:36:59Z")

</div>

I don’t think it makes particular sense to try to find a one-size-fits-all container package. IMO it would make more sense to have a few and to instruct users in the Julia documentation how to use these containers for common tasks. As @Orbots pointed out, the subset of the STDLIB that folks use varies from person to person. I haven’t needed DataFrames yet, for one.

EDIT: Also, _teaching_ people how to create these handy container "using"s would be even more useful. After all, it is nothing but a module. Mine would look like this:

```julia
module Numerics

  using Reexport

  @reexport using LinearAlgebra
  @reexport using Statistics
  @reexport using StatsBase
  @reexport using SparseArrays
  @reexport using StaticArrays

end

```

---

<div class="post-metadata">

**Author:** ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Post date:** [June 4, 2020, 12:18am UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/6 "2020-06-04T00:18:01Z")

</div>

Maybe there should be something that takes a list of package names and then creates a meta-package for you…a meta-package creating package?

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [June 4, 2020, 5:12am UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/7 "2020-06-04T05:12:41Z")

</div>

> [@PetrKryslUCSD](#):
>
> _teaching_ people how to create these handy container "using"s would be even more useful.

Also valid. That’s the emacs approach. Numerics.jl is the VSCode approach. Both have merit.

But VSCode is just easier.

---

<div class="post-metadata">

**Author:** ![jw3126](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jw3126/32/3086_2.png) [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Post date:** [June 4, 2020, 8:30am UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/8 "2020-06-04T08:30:18Z")

</div>

Like

```julia
using LinearAlgebraStatsBaseStatisticsDataFramesDataStructures

```

---

<div class="post-metadata">

**Author:** ![djsegal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/djsegal/32/13752_2.png) [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Post date:** [June 4, 2020, 8:39am UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/9 "2020-06-04T08:39:45Z")

</div>

Just added `Random` and `SparseArrays` to the package’s bundle

The reason I didn’t add Distributions, StaticArrays, etc. is because I wanted [`Numerics`](https://github.com/djsegal/Numerics.jl) to load in **`1s`**

* * *

I’m already keeping a list of slower packages though:

- [Make Bonus Bundle for Slower Packages · Issue #1 · djsegal/Numerics.jl · GitHub](https://github.com/djsegal/Numerics.jl/issues/1)

// maybe they can be added if they get faster or have widespread usage

---

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [June 4, 2020, 10:42am UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/10 "2020-06-04T10:42:33Z")

</div>

Perhaps there should be a basic version of this pacakge that only depends on stdlib modules, so that it could be safely used in any environment, without version compatibility issues.

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [June 4, 2020, 1:52pm UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/11 "2020-06-04T13:52:00Z")

</div>

I think one does _not need_ a package. It is literally just a few lines inside (your own) module [(complete code here)](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/4). Easier to change on the fly whenever your needs change.

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [June 4, 2020, 3:30pm UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/12 "2020-06-04T15:30:51Z")

</div>

Not sure I understand the choice of packages wrt the name… Dataframes isn’t a numerics package, surely, and statistics packages seem a bit peripheral. SpecialFunctions, Hcubature, QuadGK, etc seem a lot more relevant.

---

<div class="post-metadata">

**Author:** ![ctkelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ctkelley/32/10684_2.png) [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Post date:** [June 4, 2020, 3:40pm UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/13 "2020-06-04T15:40:07Z")

</div>

I have this kind of stuff in my startup.jl file. Is either of the approaches this thread is about faster/shinier/better?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [June 4, 2020, 3:48pm UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/14 "2020-06-04T15:48:18Z")

</div>

I personally think this is a pretty bad way to go about solving the problem of people not knowing what packages to import to know where a few functions are. For a limited few that exist by default in the global namespace in other languages (read MATLAB) it has some merit but this includes stuff like DataFrames and DataStructures where you are definitely going to have to read the docs to use so you need to know what packages are in the bundle anyway.

Pretty much the only reason I see for something like this is that if you happen to want to use all the packages that are in the bundle, then it is shorter to write `using BundlePackage` over the individual packages.

It’s also a bit of a shame that a decent package name got used for something like this.

---

<div class="post-metadata">

**Author:** ![anon94023334](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@anon94023334](https://discourse.julialang.org/u/anon94023334)\
**Post date:** [June 4, 2020, 4:00pm UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/15 "2020-06-04T16:00:00Z")

</div>

> [@PetrKryslUCSD](#):
>
> I don’t think it makes particular sense to try to find a one-size-fits-all container package.

[We have one already](https://github.com/ChrisRackauckas/Cuddle.jl).

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [June 4, 2020, 4:03pm UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/16 "2020-06-04T16:03:17Z")

</div>

I think you should have posted this with a disclaimer.

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [June 4, 2020, 4:09pm UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/17 "2020-06-04T16:09:10Z")

</div>

> [@kristoffer.carlsson](#):
>
> bit of a shame that a decent package

Yeah

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [June 4, 2020, 4:15pm UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/18 "2020-06-04T16:15:29Z")

</div>

I don’t use this myself. I like to know where things come from when I use them to code.  
Explicit `using` everywhere.

But, I don’t work a lot in the REPL. I can see how having a module with all the “usual” stuff may be handy.

---

<div class="post-metadata">

**Author:** ![ctkelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ctkelley/32/10684_2.png) [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Post date:** [June 4, 2020, 4:51pm UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/19 "2020-06-04T16:51:23Z")

</div>

I’m a REPL guy and mostly use the same packages all the time. The module would make my startup.jl file a few lines shorter, but I can’t see any other benefits.

---

<div class="post-metadata">

**Author:** ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Post date:** [June 4, 2020, 4:53pm UTC](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694/20 "2020-06-04T16:53:41Z")

</div>

Can you explain how you added this in startup?

[Next page](https://discourse.julialang.org/t/ann-numerics-jl-the-extended-standard-library/40694.md?page=2)
