# Latest

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

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

**Page:** 1387

---

## [Error precompiling MATLAB.jl](https://discourse.julialang.org/t/error-precompiling-matlab-jl/61399)

<div class="topic-metadata">

**Author:** [@PaoloVarraso](https://discourse.julialang.org/u/PaoloVarraso)\
**Replies:** 2\
**Last updated:** [May 20, 2021, 10:09am UTC](https://discourse.julialang.org/t/error-precompiling-matlab-jl/61399 "2021-05-20T10:09:06Z")

</div>

Hi, I am trying to use the MATLAB.jl package on my Mac. The installation seems successful but when I try to use the package I get the following error julia\> using MATLAB \[ Info: Precompiling MATLAB \[10e44e05-a98a-55b3…

---

## [Simulating quantum circuits with Yao](https://discourse.julialang.org/t/simulating-quantum-circuits-with-yao/61390)

<div class="topic-metadata">

**Author:** [@rmedinar](https://discourse.julialang.org/u/rmedinar)\
**Replies:** 4\
**Last updated:** [May 20, 2021, 8:58am UTC](https://discourse.julialang.org/t/simulating-quantum-circuits-with-yao/61390 "2021-05-20T08:58:34Z")

</div>

Hi there! I’m new in the Julia ecosystems and my first project is trying to simulate a particular random circuit using Yao. My issue at the moment is basically the efficiency of code which seems to be quite slow. I would…

---

## [A confusing problem of pipe](https://discourse.julialang.org/t/a-confusing-problem-of-pipe/61438)

<div class="topic-metadata">

**Author:** [@314](https://discourse.julialang.org/u/314)\
**Replies:** 10\
**Last updated:** [May 20, 2021, 8:55am UTC](https://discourse.julialang.org/t/a-confusing-problem-of-pipe/61438 "2021-05-20T08:55:20Z")

</div>

This is my code split("hello-world julia", \[' ', '-'\]) .|\> x -\> filter(isletter, x) .|\> first .|\> uppercase |\> join I want to get the result "HWJ", but I get a 3-element Vector{String}: "H" "W" …

---

## [TypeError for TimeArray](https://discourse.julialang.org/t/typeerror-for-timearray/59878)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 1\
**Last updated:** [May 20, 2021, 8:46am UTC](https://discourse.julialang.org/t/typeerror-for-timearray/59878 "2021-05-20T08:46:02Z")

</div>

I encountered a Julia crash and got this: Internal error: encountered unexpected error in runtime: TypeError(func=:TimeArray, context="D", expected=D\<:Dates.TimeType, got=Array{Int64, 1}) jl\_type\_error\_rt at /cygdrive/c…

---

## [\[SOLVED\] 37x performance hit when wrapping Refs. Any solution?](https://discourse.julialang.org/t/solved-37x-performance-hit-when-wrapping-refs-any-solution/61499)

<div class="topic-metadata">

**Author:** [@fverdugo](https://discourse.julialang.org/u/fverdugo)\
**Replies:** 2\
**Last updated:** [May 20, 2021, 8:39am UTC](https://discourse.julialang.org/t/solved-37x-performance-hit-when-wrapping-refs-any-solution/61499 "2021-05-20T08:39:08Z")

</div>

Problem I have found that wrapping Ref instances in a struct leads to a sizable performance hit. Here a MWE: using BenchmarkTools struct Foo ref::Ref{Int} Foo(a::Int) = new(Ref(a)) end work(i,ref::Ref) = sqrt(i\*re…

---

## [Cannot solve Ax=B on GPU with A CuSparseMatrixCSC](https://discourse.julialang.org/t/cannot-solve-ax-b-on-gpu-with-a-cusparsematrixcsc/60966)

<div class="topic-metadata">

**Author:** [@Ludovic\_Dumoulin](https://discourse.julialang.org/u/Ludovic_Dumoulin)\
**Replies:** 9\
**Last updated:** [May 20, 2021, 8:22am UTC](https://discourse.julialang.org/t/cannot-solve-ax-b-on-gpu-with-a-cusparsematrixcsc/60966 "2021-05-20T08:22:47Z")

</div>

Hello, I am trying to solve a A\*x=B matrix equation with A being the discretization of a differential operator. A is a CuSparseMatrixCSC{Float64}, B and x are CuArray{Float64,1}. I write the following line x .= A \\ …

---

## [NetworkDynamics.jl Kuramoto oscillators tutorial example: definition sum\_coupling!()](https://discourse.julialang.org/t/networkdynamics-jl-kuramoto-oscillators-tutorial-example-definition-sum-coupling/61129)

<div class="topic-metadata">

**Author:** [@ziolai](https://discourse.julialang.org/u/ziolai)\
**Replies:** 5\
**Last updated:** [May 20, 2021, 7:54am UTC](https://discourse.julialang.org/t/networkdynamics-jl-kuramoto-oscillators-tutorial-example-definition-sum-coupling/61129 "2021-05-20T07:54:06Z")

</div>

How is the function sum\_couling!() on the page https://pik-icon.github.io/NetworkDynamics.jl/dev/heterogeneous\_system/ defined? Thx! Domenico.

---

## [Generating vertices of a simplex](https://discourse.julialang.org/t/generating-vertices-of-a-simplex/61495)

<div class="topic-metadata">

**Author:** [@grero](https://discourse.julialang.org/u/grero)\
**Replies:** 2\
**Last updated:** [May 20, 2021, 5:09am UTC](https://discourse.julialang.org/t/generating-vertices-of-a-simplex/61495 "2021-05-20T05:09:28Z")

</div>

For a model I’ve been working on I needed to generate points (cluster centres) that were located equidistant from each other. Not a terribly hard problem, but I happen to come across this answer on mathoverflow that I fo…

---

## [How to allowscalar(false) in Pluto envrionment?](https://discourse.julialang.org/t/how-to-allowscalar-false-in-pluto-envrionment/61422)

<div class="topic-metadata">

**Author:** [@ChunXi\_Zhang](https://discourse.julialang.org/u/ChunXi_Zhang)\
**Replies:** 5\
**Last updated:** [May 20, 2021, 4:36am UTC](https://discourse.julialang.org/t/how-to-allowscalar-false-in-pluto-envrionment/61422 "2021-05-20T04:36:04Z")

</div>

I’m writing a package and using it in a pluto notebook, even though I write allowscalar(false) in my package and in my pluto notebook, it seems not effecting. It still shows ┌ Warning: Performing scalar operations on G…

---

## [NLopt returning :FAILURE, but only with :LD\_LBFGS](https://discourse.julialang.org/t/nlopt-returning-failure-but-only-with-ld-lbfgs/61475)

<div class="topic-metadata">

**Author:** [@jbshannon](https://discourse.julialang.org/u/jbshannon)\
**Replies:** 1\
**Last updated:** [May 20, 2021, 4:08am UTC](https://discourse.julialang.org/t/nlopt-returning-failure-but-only-with-ld-lbfgs/61475 "2021-05-20T04:08:40Z")

</div>

I’m minimizing a GMM criterion function (uses a lot of data, so a MWE here would be tricky) using NLopt and I keep getting a return code of :FAILURE after a few iterations whenever I use :LD\_LBFGS. I don’t think this is …

---

## [Dot calls / broadcasts for strings](https://discourse.julialang.org/t/dot-calls-broadcasts-for-strings/61195)

<div class="topic-metadata">

**Author:** [@fedario](https://discourse.julialang.org/u/fedario)\
**Replies:** 19\
**Last updated:** [May 20, 2021, 2:44am UTC](https://discourse.julialang.org/t/dot-calls-broadcasts-for-strings/61195 "2021-05-20T02:44:37Z")

</div>

I encountered some unexpected behavior regarding broadcasted functions for strings. Let’s say we have two strings: a = "abc" b = "abx" When checking for equality, the result was as I expected: a == b # result: false …

---

## [Magnifier lens of various shapes in Plots or Makie](https://discourse.julialang.org/t/magnifier-lens-of-various-shapes-in-plots-or-makie/60547)

<div class="topic-metadata">

**Author:** [@Wei\_Yang](https://discourse.julialang.org/u/Wei_Yang)\
**Replies:** 3\
**Last updated:** [May 19, 2021, 11:40pm UTC](https://discourse.julialang.org/t/magnifier-lens-of-various-shapes-in-plots-or-makie/60547 "2021-05-19T23:40:15Z")

</div>

I came across the two gif animations in the following slides in a talk that I attended last year (they are not moving :rofl: in the pictures that I attached). I wonder if I can reproduce the same animations, in particul…

---

## [Mutithreading of 3-nested loops for solving integral equations](https://discourse.julialang.org/t/mutithreading-of-3-nested-loops-for-solving-integral-equations/61485)

<div class="topic-metadata">

**Author:** [@Seif\_Shebl](https://discourse.julialang.org/u/Seif_Shebl)\
**Replies:** 0\
**Last updated:** [May 20, 2021, 12:03am UTC](https://discourse.julialang.org/t/mutithreading-of-3-nested-loops-for-solving-integral-equations/61485 "2021-05-20T00:03:12Z")

</div>

Continuing the discussion from Multithreading for nested loops:

---

## [Solving two very simple first differential equations](https://discourse.julialang.org/t/solving-two-very-simple-first-differential-equations/61472)

<div class="topic-metadata">

**Author:** [@sajad\_ghassemi](https://discourse.julialang.org/u/sajad_ghassemi)\
**Replies:** 2\
**Last updated:** [May 19, 2021, 10:57pm UTC](https://discourse.julialang.org/t/solving-two-very-simple-first-differential-equations/61472 "2021-05-19T22:57:04Z")

</div>

Hi dear. I am a newbie in Julia. I wanted to solve two first differential equations as di/dt=-(R/L)i-(1/L)\*v+(1/L)a dv/dt=(1/C)i with Julia which R,L, C is constant and the variable is i(t) and v(t). I used the funct…

---

## [Can I do the opposite of what a view does?](https://discourse.julialang.org/t/can-i-do-the-opposite-of-what-a-view-does/61470)

<div class="topic-metadata">

**Author:** [@alisdairmckay](https://discourse.julialang.org/u/alisdairmckay)\
**Replies:** 7\
**Last updated:** [May 19, 2021, 10:51pm UTC](https://discourse.julialang.org/t/can-i-do-the-opposite-of-what-a-view-does/61470 "2021-05-19T22:51:44Z")

</div>

Suppose I have a 1-d array named A. I would like to create a “view” of A called B such that B\[i,j\] = A\[i\] for any j. Is there a simple way of doing that? This is the opposite of how I understand a view refers to a sli…

---

## [Gradient of Flux model wrt to weights](https://discourse.julialang.org/t/gradient-of-flux-model-wrt-to-weights/61405)

<div class="topic-metadata">

**Author:** [@edwinb-ai](https://discourse.julialang.org/u/edwinb-ai)\
**Replies:** 4\
**Last updated:** [May 19, 2021, 10:18pm UTC](https://discourse.julialang.org/t/gradient-of-flux-model-wrt-to-weights/61405 "2021-05-19T22:18:02Z")

</div>

Hello everyone. I’m attempting to obtain the gradient of a Flux model wrt to the weights. I first want to show what I mean (or want to achieve). Suppose I have a very simple linear model such that y(x)=W \\cdot x + b…

---

## [Interested in starting Seattle Julia user group?](https://discourse.julialang.org/t/interested-in-starting-seattle-julia-user-group/25373)

<div class="topic-metadata">

**Author:** [@Daryoush\_Mehrtash](https://discourse.julialang.org/u/Daryoush_Mehrtash)\
**Replies:** 9\
**Last updated:** [May 19, 2021, 10:08pm UTC](https://discourse.julialang.org/t/interested-in-starting-seattle-julia-user-group/25373 "2021-05-19T22:08:30Z")

</div>

I am in Seattle and notice there are no Julia meetup group in Seattle. Probing the community to see if there is enough interest out there to start one. Thanks Daryoush

---

## [GtkReactive GUI with a plots.jl image](https://discourse.julialang.org/t/gtkreactive-gui-with-a-plots-jl-image/61471)

<div class="topic-metadata">

**Author:** [@nelsonah](https://discourse.julialang.org/u/nelsonah)\
**Replies:** 0\
**Last updated:** [May 19, 2021, 10:00pm UTC](https://discourse.julialang.org/t/gtkreactive-gui-with-a-plots-jl-image/61471 "2021-05-19T22:00:27Z")

</div>

I have an array of pixels called points starting as follows: points: HSV{Float64}\[HSV{Float64}(94.21025111030258,0.8823529411764706,1.0) HSV{Float64}(95.58982630472542,0.8823529411764706,1.0) …… I want it to look like…

---

## [Can someone summarize state-of-the-art workflows for generating presentable finished documents?](https://discourse.julialang.org/t/can-someone-summarize-state-of-the-art-workflows-for-generating-presentable-finished-documents/60045)

<div class="topic-metadata">

**Author:** [@philip](https://discourse.julialang.org/u/philip)\
**Replies:** 14\
**Last updated:** [May 19, 2021, 8:39pm UTC](https://discourse.julialang.org/t/can-someone-summarize-state-of-the-art-workflows-for-generating-presentable-finished-documents/60045 "2021-05-19T20:39:58Z")

</div>

Hello. I apologize if this question isn’t well-formed for the forums. I am wondering what the state of the art is for mixed plot/results-and-text documents intended for display as HTML (web) or PDF. In the old days, be…

---

## [Setting up distributed workers on seperate nodes of cluster - PBS and OpenMPI](https://discourse.julialang.org/t/setting-up-distributed-workers-on-seperate-nodes-of-cluster-pbs-and-openmpi/61013)

<div class="topic-metadata">

**Author:** [@gobs](https://discourse.julialang.org/u/gobs)\
**Replies:** 10\
**Last updated:** [May 19, 2021, 8:38pm UTC](https://discourse.julialang.org/t/setting-up-distributed-workers-on-seperate-nodes-of-cluster-pbs-and-openmpi/61013 "2021-05-19T20:38:40Z")

</div>

I’m quite new to distributed computing and high performance computing so please be kind. My university has access to an HPC which uses PBS/Torque. I’m currently running the ProgressiveHedging.jl package using all the co…

---

## [Failing to precompile external packages after upgrading to 1.6.0, but only when using an IDE](https://discourse.julialang.org/t/failing-to-precompile-external-packages-after-upgrading-to-1-6-0-but-only-when-using-an-ide/59638)

<div class="topic-metadata">

**Author:** [@maxkapur](https://discourse.julialang.org/u/maxkapur)\
**Replies:** 2\
**Last updated:** [May 19, 2021, 8:22pm UTC](https://discourse.julialang.org/t/failing-to-precompile-external-packages-after-upgrading-to-1-6-0-but-only-when-using-an-ide/59638 "2021-05-19T20:22:16Z")

</div>

I recently upgraded to Julia 1.6.0, and everything is working fine when calling Julia from the command line. However, when using Julia within an IDE–whether VSCode, Atom/Juno, or Jupyter Lab–I get an EXCEPTION\_ACCESS\_VIO…

---

## [HTTP.jl requests fail from time to time](https://discourse.julialang.org/t/http-jl-requests-fail-from-time-to-time/61407)

<div class="topic-metadata">

**Author:** [@Jack](https://discourse.julialang.org/u/Jack)\
**Replies:** 2\
**Last updated:** [May 19, 2021, 8:00pm UTC](https://discourse.julialang.org/t/http-jl-requests-fail-from-time-to-time/61407 "2021-05-19T20:00:56Z")

</div>

I found infrequent failures when using HTTP.jl library pinging for a website. It usually happens when the code did not make any queries for a while. I tried to use retry and timeout config to mitigate the issue but found…

---

## [Julia: function composition: how to correctly split arguments?](https://discourse.julialang.org/t/julia-function-composition-how-to-correctly-split-arguments/61433)

<div class="topic-metadata">

**Author:** [@ptoche](https://discourse.julialang.org/u/ptoche)\
**Replies:** 4\
**Last updated:** [May 19, 2021, 8:00pm UTC](https://discourse.julialang.org/t/julia-function-composition-how-to-correctly-split-arguments/61433 "2021-05-19T20:00:15Z")

</div>

How to define functions/functors and split arguments? I have a struct of fixed parameters, P, a mutable struct of variables, V, and three constructors for methods F, G, and H, where H is the composition of F and G. The …

---

## [\[Julia usage\] How to get 2D indexes from 1D index when accessing a 2D array?](https://discourse.julialang.org/t/julia-usage-how-to-get-2d-indexes-from-1d-index-when-accessing-a-2d-array/61440)

<div class="topic-metadata">

**Author:** [@erwanlecarpentier](https://discourse.julialang.org/u/erwanlecarpentier)\
**Replies:** 8\
**Last updated:** [May 19, 2021, 6:16pm UTC](https://discourse.julialang.org/t/julia-usage-how-to-get-2d-indexes-from-1d-index-when-accessing-a-2d-array/61440 "2021-05-19T18:16:34Z")

</div>

Hi! I have a 2D array x. I can access its elements by using “1D indexing” (e.g. x\[3\]) or “2D indexing” (e.g. x\[3, 1\]). Question: given an integer i that could be used as a 1D index, how to retrieve the 2D indexes r, c t…

---

## [Installed GMT.jl package and GMT v6.1.1 for Windows 64 bit. How can I start working with GMT package?](https://discourse.julialang.org/t/installed-gmt-jl-package-and-gmt-v6-1-1-for-windows-64-bit-how-can-i-start-working-with-gmt-package/61356)

<div class="topic-metadata">

**Author:** [@shubh\_b](https://discourse.julialang.org/u/shubh_b)\
**Replies:** 6\
**Last updated:** [May 19, 2021, 5:26pm UTC](https://discourse.julialang.org/t/installed-gmt-jl-package-and-gmt-v6-1-1-for-windows-64-bit-how-can-i-start-working-with-gmt-package/61356 "2021-05-19T17:26:11Z")

</div>

I installed GMT.jl package and installed GMT for 64 bit Windows. Added GMT to PATH also. From Windows command prompt I can run gmt, it is showing list of options: But in Julia, it cannot detect gmt, showing message: …

---

## [Modify right margin in Pluto notebook](https://discourse.julialang.org/t/modify-right-margin-in-pluto-notebook/61452)

<div class="topic-metadata">

**Author:** [@disberd](https://discourse.julialang.org/u/disberd)\
**Replies:** 2\
**Last updated:** [May 19, 2021, 4:32pm UTC](https://discourse.julialang.org/t/modify-right-margin-in-pluto-notebook/61452 "2021-05-19T16:32:00Z")

</div>

Hi, I wanted to modify the right margin of pluto notebook cells as if I increase the cell width like suggested in This other topic and then reduce the browser window size, the right margin makes my cell go out of the vi…

---

## [Vcat multiple DataFrames](https://discourse.julialang.org/t/vcat-multiple-dataframes/61455)

<div class="topic-metadata">

**Author:** [@AlexisRenchon](https://discourse.julialang.org/u/AlexisRenchon)\
**Replies:** 1\
**Last updated:** [May 19, 2021, 3:46pm UTC](https://discourse.julialang.org/t/vcat-multiple-dataframes/61455 "2021-05-19T15:46:24Z")

</div>

I have a bunch of DataFrameRow in a Dict that I want to convert to a DataFrame julia\> RSM\_df\[:RSM\_77\] 13-element Vector{Any}: DataFrameRow Row │ datetime RSM\_Date\_IV RSM\_Exp\_Flux RSM\_Exp\_FluxCV …

---

## [SparseMatrix or SArray, MArray?](https://discourse.julialang.org/t/sparsematrix-or-sarray-marray/61401)

<div class="topic-metadata">

**Author:** [@hardy](https://discourse.julialang.org/u/hardy)\
**Replies:** 7\
**Last updated:** [May 19, 2021, 3:42pm UTC](https://discourse.julialang.org/t/sparsematrix-or-sarray-marray/61401 "2021-05-19T15:42:41Z")

</div>

I’m just getting used to Julia and therefore have very basic questions: SparseMatrix I have a little sparse matrix (only 11 Rows). Since the number of entries for storage as SparseMatrixCSC must be known: Will such a…

---

## [Copying cross-referenced values](https://discourse.julialang.org/t/copying-cross-referenced-values/61442)

<div class="topic-metadata">

**Author:** [@Niall](https://discourse.julialang.org/u/Niall)\
**Replies:** 4\
**Last updated:** [May 19, 2021, 3:20pm UTC](https://discourse.julialang.org/t/copying-cross-referenced-values/61442 "2021-05-19T15:20:58Z")

</div>

Hi, I have a rather newbie question. If I enter this code: vecvec = \[\[5\]\] doubled = \[vecvec;vecvec\] copied = deepcopy(doubled) println( "doubled: ", doubled) println( "copied: ", copied) copied\[1\]\[1\] = 7 println( "do…

---

## [\`Char\` and \`broadcastable\`](https://discourse.julialang.org/t/char-and-broadcastable/61221)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 8\
**Last updated:** [May 19, 2021, 2:43pm UTC](https://discourse.julialang.org/t/char-and-broadcastable/61221 "2021-05-19T14:43:31Z")

</div>

A related question: Is it intentional that broadcastable is not explicitly defined for Char in broadcast.jl? Instead the default method for iterables is used. String in contrast is treated as a scalar, as discussed above…

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

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