# Latest

**URL:** https://discourse.julialang.org/latest.md?page=1884

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 1885

---

## [Problem of the calculation of matrix](https://discourse.julialang.org/t/problem-of-the-calculation-of-matrix/30956)

<div class="topic-metadata">

**Author:** [@FujiwaraTakumiEH](https://discourse.julialang.org/u/FujiwaraTakumiEH)\
**Replies:** 4\
**Last updated:** [November 12, 2019, 1:17am UTC](https://discourse.julialang.org/t/problem-of-the-calculation-of-matrix/30956 "2019-11-12T01:17:30Z")

</div>

Background : I use Julia to construct Symmetric normalized Laplacian matrix L^{sym} (Matrix D is a diagonal matrix):L^{sym}=D^{-1/2}×L×D^{-1/2}. Matrix L^{sym} is a sparse matrix. My computer configuration: julia\> ve…

---

## [About Adding Git packages in juliabox](https://discourse.julialang.org/t/about-adding-git-packages-in-juliabox/30982)

<div class="topic-metadata">

**Author:** [@Dexter](https://discourse.julialang.org/u/Dexter)\
**Replies:** 0\
**Last updated:** [November 12, 2019, 1:16am UTC](https://discourse.julialang.org/t/about-adding-git-packages-in-juliabox/30982 "2019-11-12T01:16:26Z")

</div>

Since I know little about jupyter backgrounds, I have no idea how to fix this error.

---

## [GLM.jl DataFrame not defined error](https://discourse.julialang.org/t/glm-jl-dataframe-not-defined-error/29454)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 2\
**Last updated:** [November 11, 2019, 11:12pm UTC](https://discourse.julialang.org/t/glm-jl-dataframe-not-defined-error/29454 "2019-11-11T23:12:15Z")

</div>

I’m getting a DataFrame not defined error when attempting to use the interval keyword argument in the predict function from GLM.jl. MWE: using DataFrames, GLM data = DataFrame(X=\[1,2,3\], Y=\[2,4,7\]) ols = lm(@formula(Y…

---

## [ANN: linter-julia plugin for Atom / Juno](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118)

<div class="topic-metadata">

**Author:** [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)\
**Replies:** 30\
**Last updated:** [November 11, 2019, 10:34pm UTC](https://discourse.julialang.org/t/ann-linter-julia-plugin-for-atom-juno/2118 "2019-11-11T22:34:29Z")

</div>

linter-julia ========================= This linter plugin for Linter provides an interface to Lint.jl. It will be used with files that have the “Julia” syntax. Installation Install package through Atom or use CLI: $…

---

## [How to add a package but only if it is not already there?](https://discourse.julialang.org/t/how-to-add-a-package-but-only-if-it-is-not-already-there/30674)

<div class="topic-metadata">

**Author:** [@andromodon](https://discourse.julialang.org/u/andromodon)\
**Replies:** 22\
**Last updated:** [November 11, 2019, 10:03pm UTC](https://discourse.julialang.org/t/how-to-add-a-package-but-only-if-it-is-not-already-there/30674 "2019-11-11T22:03:35Z")

</div>

Hi. I’m learning Julia for the first time. I’'m looking for a way to say in my program “If you don’t already have this package, then get it, but if you do, then just use it”. The issue is that if I just put Pkg.add(“D…

---

## [SAMIN() in Julia (Simulated Annealing)?](https://discourse.julialang.org/t/samin-in-julia-simulated-annealing/30972)

<div class="topic-metadata">

**Author:** [@bashonubuntu](https://discourse.julialang.org/u/bashonubuntu)\
**Replies:** 0\
**Last updated:** [November 11, 2019, 9:57pm UTC](https://discourse.julialang.org/t/samin-in-julia-simulated-annealing/30972 "2019-11-11T21:57:47Z")

</div>

Hello, I was looking at the SAMIN() code in Optim (Optim.jl) and wanted to ask if someone could help provide some intuition for the nt, ns and neps terms. While checking some julia discourses online, there seems to be …

---

## [ANN: Overseer.jl](https://discourse.julialang.org/t/ann-overseer-jl/30970)

<div class="topic-metadata">

**Author:** [@louisponet](https://discourse.julialang.org/u/louisponet)\
**Replies:** 0\
**Last updated:** [November 11, 2019, 9:04pm UTC](https://discourse.julialang.org/t/ann-overseer-jl/30970 "2019-11-11T21:04:19Z")

</div>

Hi All, I’m very happy to announce Overseer.jl, a package that implements a lightweight, performance oriented, entity component system(ECS). Aside from the previous goals it also aims to be as low friction as possible A…

---

## [Behavior of all() and any() on empty vectors](https://discourse.julialang.org/t/behavior-of-all-and-any-on-empty-vectors/30963)

<div class="topic-metadata">

**Author:** [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Replies:** 7\
**Last updated:** [November 11, 2019, 8:17pm UTC](https://discourse.julialang.org/t/behavior-of-all-and-any-on-empty-vectors/30963 "2019-11-11T20:17:14Z")

</div>

This caught me by surprise: julia\> any(x-\>true, \[\]) false julia\> all(x-\>true, \[\]) true julia\> any(x-\>false, \[\]) false julia\> all(x-\>false, \[\]) true This seems like a bug - I think that all should never be true when a…

---

## [Cplex turn logging off](https://discourse.julialang.org/t/cplex-turn-logging-off/30967)

<div class="topic-metadata">

**Author:** [@marinarrd](https://discourse.julialang.org/u/marinarrd)\
**Replies:** 3\
**Last updated:** [November 11, 2019, 7:40pm UTC](https://discourse.julialang.org/t/cplex-turn-logging-off/30967 "2019-11-11T19:40:48Z")

</div>

Hello, I am using CPLEX solver and I would like to silence the output. I know with Gurobi you set OutputFlag=0 as in the following. Does anyone know? m=Model(with\_optimizer(Gurobi.Optimizer,OutputFlag=0))

---

## [Rules for constant elimination](https://discourse.julialang.org/t/rules-for-constant-elimination/6393)

<div class="topic-metadata">

**Author:** [@foobar\_lv](https://discourse.julialang.org/u/foobar_lv)\
**Replies:** 1\
**Last updated:** [October 11, 2017, 8:59pm UTC](https://discourse.julialang.org/t/rules-for-constant-elimination/6393 "2017-10-11T20:59:14Z")

</div>

Is there documentation for the rules for constant elimination? Or is there a well-documented/readable source file I could read? I recently ran into a rather severe performance gotcha in julia 0.6.0 (which is almost wort…

---

## [Trouble installing julia-client@0.13.11 in Manjaro Linux](https://discourse.julialang.org/t/trouble-installing-julia-client-0-13-11-in-manjaro-linux/30938)

<div class="topic-metadata">

**Author:** [@Urielge](https://discourse.julialang.org/u/Urielge)\
**Replies:** 7\
**Last updated:** [November 11, 2019, 6:12pm UTC](https://discourse.julialang.org/t/trouble-installing-julia-client-0-13-11-in-manjaro-linux/30938 "2019-11-11T18:12:51Z")

</div>

Hi, I have some trouble installing julia-client and I hope someone can help, thank you very much. These are my versions Atom : 1.41.0 Electron: 4.2.12 Chrome : 69.0.3497.128 Node : 10.11.0 npm version 6.4.1 …

---

## [Behavior of Base.maximum](https://discourse.julialang.org/t/behavior-of-base-maximum/30961)

<div class="topic-metadata">

**Author:** [@guberger](https://discourse.julialang.org/u/guberger)\
**Replies:** 5\
**Last updated:** [November 11, 2019, 4:46pm UTC](https://discourse.julialang.org/t/behavior-of-base-maximum/30961 "2019-11-11T16:46:09Z")

</div>

Hello! The following piece of code (example) prints 10 while I would have expected 5: for i = 1:1 it = 1:5 f(t) = t b = maximum(f, it) f(t) = 2\*t display(b) end Does someone have an explanation for …

---

## [Default argument that's not executed unless needed?](https://discourse.julialang.org/t/default-argument-thats-not-executed-unless-needed/30957)

<div class="topic-metadata">

**Author:** [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Replies:** 2\
**Last updated:** [November 11, 2019, 3:25pm UTC](https://discourse.julialang.org/t/default-argument-thats-not-executed-unless-needed/30957 "2019-11-11T15:25:14Z")

</div>

I’m trying to write a script where one of the arguments can be a list of things, a file path, or have a default. I’m using ArgParse.jl, and when a user passes eg --parents \<stuff...\> to the commandline, I get an array st…

---

## [Imported ScikitLearn PyObj becomes NULL in a module](https://discourse.julialang.org/t/imported-scikitlearn-pyobj-becomes-null-in-a-module/30942)

<div class="topic-metadata">

**Author:** [@Sijun](https://discourse.julialang.org/u/Sijun)\
**Replies:** 4\
**Last updated:** [November 11, 2019, 2:39pm UTC](https://discourse.julialang.org/t/imported-scikitlearn-pyobj-becomes-null-in-a-module/30942 "2019-11-11T14:39:43Z")

</div>

module TestMod using ScikitLearn: @sk\_import @sk\_import linear\_model: LogisticRegression println(LogisticRegression) export fun function fun() println(LogisticRegression) end end When the above TestMod is impor…

---

## [Can we do "not-a-knot spline" in Julia?](https://discourse.julialang.org/t/can-we-do-not-a-knot-spline-in-julia/30955)

<div class="topic-metadata">

**Author:** [@ethanminfang](https://discourse.julialang.org/u/ethanminfang)\
**Replies:** 0\
**Last updated:** [November 11, 2019, 2:17pm UTC](https://discourse.julialang.org/t/can-we-do-not-a-knot-spline-in-julia/30955 "2019-11-11T14:17:20Z")

</div>

I don’t know if the Cubic Spline is “not-a-knot spline” as in Matlab, or? http://juliamath.github.io/Interpolations.jl/latest/api/#Public-API-1 Thanks! Best, Ethan

---

## [VSCode LoadError: MethodError crashing on Linux](https://discourse.julialang.org/t/vscode-loaderror-methoderror-crashing-on-linux/30951)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 1\
**Last updated:** [November 11, 2019, 2:01pm UTC](https://discourse.julialang.org/t/vscode-loaderror-methoderror-crashing-on-linux/30951 "2019-11-11T14:01:48Z")

</div>

Hello, I wanted give a try to VS Code, but on my setup (Julia 1.2, Ubuntu), I can’t get it working. I did install VSCode using deb, then from VSCode I installed the Julia extension, but then when I try to evaluate anyth…

---

## [Elementwise mapping preserving static type](https://discourse.julialang.org/t/elementwise-mapping-preserving-static-type/30953)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 0\
**Last updated:** [November 11, 2019, 1:59pm UTC](https://discourse.julialang.org/t/elementwise-mapping-preserving-static-type/30953 "2019-11-11T13:59:05Z")

</div>

I would like to map a vector of vectors (the latter static) elementwise, so that the static type is preserved. # setup using StaticArrays, Test bs = \[SVector{4}(randn(4)...) for \_ in 1:9\] # 9 is "large" in real life A =…

---

## [NLsolve always gives the initial guess as the final answer](https://discourse.julialang.org/t/nlsolve-always-gives-the-initial-guess-as-the-final-answer/30807)

<div class="topic-metadata">

**Author:** [@huchiayu0517](https://discourse.julialang.org/u/huchiayu0517)\
**Replies:** 4\
**Last updated:** [November 11, 2019, 8:54am UTC](https://discourse.julialang.org/t/nlsolve-always-gives-the-initial-guess-as-the-final-answer/30807 "2019-11-11T08:54:39Z")

</div>

Hi there! I’m trying to solve a nonlinear system of equations using the NLsolve package. However, I kept getting the same answer as my initial guess as if the solver did not do any iteration at all. I did not use Jacobia…

---

## [Why is fld(a, b) so much slower than floor(a / b)?](https://discourse.julialang.org/t/why-is-fld-a-b-so-much-slower-than-floor-a-b/30914)

<div class="topic-metadata">

**Author:** [@zsoerenm](https://discourse.julialang.org/u/zsoerenm)\
**Replies:** 11\
**Last updated:** [November 11, 2019, 8:29am UTC](https://discourse.julialang.org/t/why-is-fld-a-b-so-much-slower-than-floor-a-b/30914 "2019-11-11T08:29:37Z")

</div>

I am using mod in a hot loop and I wondered why it is taking so much time. When I implemented mod myself with mod\_fast(a, b) = a - b \* floor(a / b) I found out it was a lot faster: julia\> @btime mod\_fast($(Ref(1232.2…

---

## [Is it a good idea to avoid Channel{Any} and how to avoid it?](https://discourse.julialang.org/t/is-it-a-good-idea-to-avoid-channel-any-and-how-to-avoid-it/30932)

<div class="topic-metadata">

**Author:** [@scelles](https://discourse.julialang.org/u/scelles)\
**Replies:** 0\
**Last updated:** [November 10, 2019, 10:06pm UTC](https://discourse.julialang.org/t/is-it-a-good-idea-to-avoid-channel-any-and-how-to-avoid-it/30932 "2019-11-10T22:06:03Z")

</div>

Hello, I have the following code ljulia\> lst\_a = \[1, 2, 3, 4\] 4-element Array{Int64,1}: 1 2 3 4 julia\> lst\_b = \[10.1, 11.1, 12.1, 13.1\] 4-element Array{Float64,1}: 10.1 11.1 12.1 13.1 julia\> function generato…

---

## [What's the most idiomatic way in Julia to "invert" a unit range?](https://discourse.julialang.org/t/whats-the-most-idiomatic-way-in-julia-to-invert-a-unit-range/30929)

<div class="topic-metadata">

**Author:** [@jburgy](https://discourse.julialang.org/u/jburgy)\
**Replies:** 4\
**Last updated:** [November 11, 2019, 5:59am UTC](https://discourse.julialang.org/t/whats-the-most-idiomatic-way-in-julia-to-invert-a-unit-range/30929 "2019-11-11T05:59:29Z")

</div>

I am parallelizing an implicit sparse matrix vector multiplication. This requires translating between block and matrix indices. The blocks are defined by UnitRange. getindex(v::UnitRange{T}, i::Integer) maps a block i…

---

## [Rewind iterators](https://discourse.julialang.org/t/rewind-iterators/30930)

<div class="topic-metadata">

**Author:** [@scelles](https://discourse.julialang.org/u/scelles)\
**Replies:** 4\
**Last updated:** [November 10, 2019, 11:06pm UTC](https://discourse.julialang.org/t/rewind-iterators/30930 "2019-11-10T23:06:08Z")

</div>

Hello, I wonder if it’s possible to rewind iterator (ie without) recreating it. I tried julia\> itr = Iterators.Stateful(\[10,11,12\]) Base.Iterators.Stateful{Array{Int64,1},Union{Nothing, Tuple{Int64,Int64}}}(\[10, 11, 1…

---

## [Multinomial accepts wrong parameters](https://discourse.julialang.org/t/multinomial-accepts-wrong-parameters/30917)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 3\
**Last updated:** [November 10, 2019, 8:00pm UTC](https://discourse.julialang.org/t/multinomial-accepts-wrong-parameters/30917 "2019-11-10T20:00:35Z")

</div>

Distributions.Multinomial seems to accept a vector of probabilities that doesn’t sum to one, even if in the code reported in the documentation it should have ckeck\_args true by default. Why is that ? using Distributions…

---

## [Random numbers in \[0.f0,1.f0\]](https://discourse.julialang.org/t/random-numbers-in-0-f0-1-f0/30926)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 2\
**Last updated:** [November 10, 2019, 9:04pm UTC](https://discourse.julialang.org/t/random-numbers-in-0-f0-1-f0/30926 "2019-11-10T21:04:11Z")

</div>

Hi again, is there a simple way to have the same as this rand(\[0.f0,1.f0\],10) on the GPU? I need to generate random bits (in that case they’re Float32 but anyway), and trying the obvious thing refuses to work CuArray…

---

## [Suggestions on code-style?](https://discourse.julialang.org/t/suggestions-on-code-style/30928)

<div class="topic-metadata">

**Author:** [@bashonubuntu](https://discourse.julialang.org/u/bashonubuntu)\
**Replies:** 2\
**Last updated:** [November 10, 2019, 7:44pm UTC](https://discourse.julialang.org/t/suggestions-on-code-style/30928 "2019-11-10T19:44:12Z")

</div>

Hello, Below are two functions that do the same thing and I was wondering what is the more appropriate julian way to write and allocate output within these functions. In the second function, the only difference is that …

---

## [Discussion: Plans for Julia as a general-purpose language?](https://discourse.julialang.org/t/discussion-plans-for-julia-as-a-general-purpose-language/30861)

<div class="topic-metadata">

**Author:** [@erezsh](https://discourse.julialang.org/u/erezsh)\
**Replies:** 29\
**Last updated:** [November 10, 2019, 6:46pm UTC](https://discourse.julialang.org/t/discussion-plans-for-julia-as-a-general-purpose-language/30861 "2019-11-10T18:46:11Z")

</div>

Hi, first of all let me say that I know this is a big subject, but I couldn’t find any serious discussion about it, so I’m asking here. I think it’s obvious that Julia has a really good philosophical basis, and I believ…

---

## [How to cache dual numbers correctly /dual\_cache reinterpretation error](https://discourse.julialang.org/t/how-to-cache-dual-numbers-correctly-dual-cache-reinterpretation-error/30925)

<div class="topic-metadata">

**Author:** [@MatFi](https://discourse.julialang.org/u/MatFi)\
**Replies:** 1\
**Last updated:** [November 10, 2019, 6:44pm UTC](https://discourse.julialang.org/t/how-to-cache-dual-numbers-correctly-dual-cache-reinterpretation-error/30925 "2019-11-10T18:44:37Z")

</div>

Hi, I love the possibility to use Forwarddiff in DiffeEq, but now I’m encountering a problem with the caching of variables. let’s say I have a function foo that takes an array of size 10. Within this function I need a d…

---

## [In-place operations on matrices](https://discourse.julialang.org/t/in-place-operations-on-matrices/30908)

<div class="topic-metadata">

**Author:** [@iamsuddhasattwa](https://discourse.julialang.org/u/iamsuddhasattwa)\
**Replies:** 6\
**Last updated:** [November 10, 2019, 5:05pm UTC](https://discourse.julialang.org/t/in-place-operations-on-matrices/30908 "2019-11-10T17:05:11Z")

</div>

When working with huge matrices, the limitations of the RAM is a real issue, and one would like to perform matrix operations in place if possible. Given a matrix A which occupies a sizable chunk of RAM, what is the best …

---

## [Accessing \`ans\` by pressing the \`\[DOWN\]\` key](https://discourse.julialang.org/t/accessing-ans-by-pressing-the-down-key/30797)

<div class="topic-metadata">

**Author:** [@Iagoba\_Apellaniz](https://discourse.julialang.org/u/Iagoba_Apellaniz)\
**Replies:** 12\
**Last updated:** [November 10, 2019, 5:00pm UTC](https://discourse.julialang.org/t/accessing-ans-by-pressing-the-down-key/30797 "2019-11-10T17:00:29Z")

</div>

The title explains itself. Wouldn’t be great, in the REPL, to be able to access ans by pressing the \[DOWN\] key (or any other better one) once the history has finished? IMHO Yes, it would.

---

## [Resolved: Arpack deps.jl Linux build issue](https://discourse.julialang.org/t/resolved-arpack-deps-jl-linux-build-issue/30923)

<div class="topic-metadata">

**Author:** [@pontus](https://discourse.julialang.org/u/pontus)\
**Replies:** 0\
**Last updated:** [November 10, 2019, 4:17pm UTC](https://discourse.julialang.org/t/resolved-arpack-deps-jl-linux-build-issue/30923 "2019-11-10T16:17:45Z")

</div>

Just putting this here in event anyone else has similar issues with a linux Julia install from source on an Arch Linux kernel (this may not be an issue if installing from binaries atm). This requires root access, so may …

[Previous page](https://discourse.julialang.org/latest.md?page=1883)

[Next page](https://discourse.julialang.org/latest.md?page=1885)
