# Latest

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

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

**Page:** 1640

---

## [Misleading \`DivideError\` message](https://discourse.julialang.org/t/misleading-divideerror-message/46088)

<div class="topic-metadata">

**Author:** [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Replies:** 10\
**Last updated:** [September 6, 2020, 9:10am UTC](https://discourse.julialang.org/t/misleading-divideerror-message/46088 "2020-09-06T09:10:31Z")

</div>

The definition of DivideError has been unchanged for a long time, and I cannot decide whether it should be changed now, but the error message is unfriendly and misleading. https://docs.julialang.org/en/v1/base/base/#Cor…

---

## [AutoDiff, handling of perturbation collision](https://discourse.julialang.org/t/autodiff-handling-of-perturbation-collision/45659)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 10\
**Last updated:** [September 6, 2020, 9:06am UTC](https://discourse.julialang.org/t/autodiff-handling-of-perturbation-collision/45659 "2020-09-06T09:06:05Z")

</div>

Hi everyone, I am developping my own flavour of automatic differentiation using Dual numbers. First - why would I ever do that when so much work has been put into ForwardDiff? ForwardDiff works by transforming functio…

---

## [MATLABArrays.jl needed (similar to ElasticArrays.jl)](https://discourse.julialang.org/t/matlabarrays-jl-needed-similar-to-elasticarrays-jl/46108)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 5\
**Last updated:** [September 6, 2020, 9:04am UTC](https://discourse.julialang.org/t/matlabarrays-jl-needed-similar-to-elasticarrays-jl/46108 "2020-09-06T09:04:45Z")

</div>

I’m porting MATLAB code to Julia, and I know about the helpful packages (and the transpiler), I port gradually, and leave some stuff in MATLAB, or by now even Octave. Does anyone know if there’s an array type (in a pack…

---

## [How to find out which package prevents updating TikzPictures in Julia v1.5](https://discourse.julialang.org/t/how-to-find-out-which-package-prevents-updating-tikzpictures-in-julia-v1-5/45992)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 4\
**Last updated:** [September 6, 2020, 9:00am UTC](https://discourse.julialang.org/t/how-to-find-out-which-package-prevents-updating-tikzpictures-in-julia-v1-5/45992 "2020-09-06T09:00:23Z")

</div>

I got the following error message but it doesn’t look helpful. (@v1.5) pkg\> add TikzPictures@v3.3.0 Resolving package versions... ERROR: Unsatisfiable requirements detected for package TikzPictures \[37f6aa50\]: TikzPi…

---

## [Makie.jl - How to plot a 3D animation?](https://discourse.julialang.org/t/makie-jl-how-to-plot-a-3d-animation/46129)

<div class="topic-metadata">

**Author:** [@yosuga](https://discourse.julialang.org/u/yosuga)\
**Replies:** 0\
**Last updated:** [September 6, 2020, 6:08am UTC](https://discourse.julialang.org/t/makie-jl-how-to-plot-a-3d-animation/46129 "2020-09-06T06:08:54Z")

</div>

Hi,I have a question. I would like to ask How to plot a time-evolution of a 3D Gaussian function with Makie.jl. I tried to write a code in reference to a surface-version code of sin( r )/r. 1.Make a model and Solve a …

---

## [\`Conv\` is 2x slow than pytorch \`Conv\` on cpu](https://discourse.julialang.org/t/conv-is-2x-slow-than-pytorch-conv-on-cpu/39802)

<div class="topic-metadata">

**Author:** [@yiyuezhuo](https://discourse.julialang.org/u/yiyuezhuo)\
**Replies:** 9\
**Last updated:** [September 6, 2020, 5:43am UTC](https://discourse.julialang.org/t/conv-is-2x-slow-than-pytorch-conv-on-cpu/39802 "2020-09-06T05:43:34Z")

</div>

Example: using BenchmarkTools using Flux conv = Conv((7,7), 3 =\> 64; stride=2, pad=3) dummy = randn(Float32, 224, 224, 3, 2); conv(dummy) # ignore compile time @benchmark conv(dummy) #= BenchmarkTools.Trial: memor…

---

## [Number of the Beast](https://discourse.julialang.org/t/number-of-the-beast/46102)

<div class="topic-metadata">

**Author:** [@StevenSiew](https://discourse.julialang.org/u/StevenSiew)\
**Replies:** 4\
**Last updated:** [September 6, 2020, 2:45am UTC](https://discourse.julialang.org/t/number-of-the-beast/46102 "2020-09-06T02:45:10Z")

</div>

julia\> using Colors julia\> Colors.color\_names Dict{String,Tuple{Int64,Int64,Int64}} with 666 entries: “darkorchid” =\> (153, 50, 204) “chocolate” =\> (210, 105, 30) Now what are the odds of that!!!

---

## [Saving PhyloPlots plots](https://discourse.julialang.org/t/saving-phyloplots-plots/45921)

<div class="topic-metadata">

**Author:** [@eckofoid](https://discourse.julialang.org/u/eckofoid)\
**Replies:** 1\
**Last updated:** [September 6, 2020, 12:11am UTC](https://discourse.julialang.org/t/saving-phyloplots-plots/45921 "2020-09-06T00:11:34Z")

</div>

Is there a programmatic way to save a plot generated using PhyloNetworks and PhyloPlots without resorting to R calls? The latter will not accept a file name passed from program arguments, and is, therefore, not very usef…

---

## [When to use StaticArrays](https://discourse.julialang.org/t/when-to-use-staticarrays/46123)

<div class="topic-metadata">

**Author:** [@danielw2904](https://discourse.julialang.org/u/danielw2904)\
**Replies:** 4\
**Last updated:** [September 5, 2020, 11:11pm UTC](https://discourse.julialang.org/t/when-to-use-staticarrays/46123 "2020-09-05T23:11:31Z")

</div>

I have been looking into StaticArrays.jl to speed up linear algebra but I think I am doing something wrong or testing the wrong things. My first test was a simple linear model: using StaticArrays, Random, BenchmarkTool…

---

## [How to get around lack of indexing to Base.Iterators.product to allow threaded access](https://discourse.julialang.org/t/how-to-get-around-lack-of-indexing-to-base-iterators-product-to-allow-threaded-access/46118)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 5\
**Last updated:** [September 5, 2020, 10:24pm UTC](https://discourse.julialang.org/t/how-to-get-around-lack-of-indexing-to-base-iterators-product-to-allow-threaded-access/46118 "2020-09-05T22:24:27Z")

</div>

The following loop works without threading but fails because it cant seem to index the iterator: arr1 = \[5:10;\] arr2 = \[20:5:30;\] comb = Base.Iterators.product(arr1,arr2) function threadedComb(comb) Threads.@thread…

---

## [OrderedDict with duplicate items?](https://discourse.julialang.org/t/ordereddict-with-duplicate-items/46103)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 8\
**Last updated:** [September 5, 2020, 9:26pm UTC](https://discourse.julialang.org/t/ordereddict-with-duplicate-items/46103 "2020-09-05T21:26:33Z")

</div>

Hello! Would anyone know if it is possible to make a slight rewrite, such that one can make a dict with duplicate entries in a specific order, initially set? I see from this answer that one can make a duplicate key dic…

---

## [RotatedSecondOrderCone() usage](https://discourse.julialang.org/t/rotatedsecondordercone-usage/46019)

<div class="topic-metadata">

**Author:** [@asavasci](https://discourse.julialang.org/u/asavasci)\
**Replies:** 8\
**Last updated:** [September 5, 2020, 8:23pm UTC](https://discourse.julialang.org/t/rotatedsecondordercone-usage/46019 "2020-09-05T20:23:45Z")

</div>

Hi, how should I use RotatedSecondOrderCone() object when converting soc constraint x^2 + y^2 \<= wz where w\>=0, z\>= 0 ? I tried to resemble the constraint to given syntax in the manual . However, I am not sure if I am d…

---

## [What is the correct way to access a variable number of workspaces with a variable number of threads?](https://discourse.julialang.org/t/what-is-the-correct-way-to-access-a-variable-number-of-workspaces-with-a-variable-number-of-threads/46111)

<div class="topic-metadata">

**Author:** [@cgeoga](https://discourse.julialang.org/u/cgeoga)\
**Replies:** 3\
**Last updated:** [September 5, 2020, 8:06pm UTC](https://discourse.julialang.org/t/what-is-the-correct-way-to-access-a-variable-number-of-workspaces-with-a-variable-number-of-threads/46111 "2020-09-05T20:06:23Z")

</div>

Hey all— I am trying to write a good thread-parallel implementation of a problem that can be described quickly like this: The user has to do n tasks, each of which require a workspace. They can provide any number of w…

---

## [Legendfontfamily problem with Plots.jl pyplot() backend](https://discourse.julialang.org/t/legendfontfamily-problem-with-plots-jl-pyplot-backend/46120)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 0\
**Last updated:** [September 5, 2020, 7:36pm UTC](https://discourse.julialang.org/t/legendfontfamily-problem-with-plots-jl-pyplot-backend/46120 "2020-09-05T19:36:11Z")

</div>

Hi, the parameter legendfontfamily=:Courier seems to be (silently) ignored with Plots.plot(…) when I use the pyplot() backend. The parameter is used with gr() but in this case the rest of my plot breaks… Any hint ?

---

## [Reverting a repo: dev + 2\*Manifest + instantiate - resolve = Pkg confusion](https://discourse.julialang.org/t/reverting-a-repo-dev-2-manifest-instantiate-resolve-pkg-confusion/46076)

<div class="topic-metadata">

**Author:** [@NiclasMattsson](https://discourse.julialang.org/u/NiclasMattsson)\
**Replies:** 9\
**Last updated:** [September 5, 2020, 7:29pm UTC](https://discourse.julialang.org/t/reverting-a-repo-dev-2-manifest-instantiate-resolve-pkg-confusion/46076 "2020-09-05T19:29:51Z")

</div>

I’m using Pkg.dev to develop a package (an application, not a library) on a local path. I commit the package Manifest into my repo so I can revert and run instantiate in case I mess up my package dependencies. That happ…

---

## [Does indexing over a subset of rows in a DataFrame return a view or a copy?](https://discourse.julialang.org/t/does-indexing-over-a-subset-of-rows-in-a-dataframe-return-a-view-or-a-copy/46109)

<div class="topic-metadata">

**Author:** [@conditionality](https://discourse.julialang.org/u/conditionality)\
**Replies:** 5\
**Last updated:** [September 5, 2020, 7:22pm UTC](https://discourse.julialang.org/t/does-indexing-over-a-subset-of-rows-in-a-dataframe-return-a-view-or-a-copy/46109 "2020-09-05T19:22:41Z")

</div>

According to the manual, \[:, ColumnName\] returns a read-only view of the columns. Does it also work when indexing over a subset of the rows \[my\_rows\_of\_interest, :\]? Does it matter if my\_rows\_of\_interest is contiguous or…

---

## [How to stop taking gradient of neural network in Flux.jl?](https://discourse.julialang.org/t/how-to-stop-taking-gradient-of-neural-network-in-flux-jl/46062)

<div class="topic-metadata">

**Author:** [@DeepQ](https://discourse.julialang.org/u/DeepQ)\
**Replies:** 1\
**Last updated:** [September 5, 2020, 5:27pm UTC](https://discourse.julialang.org/t/how-to-stop-taking-gradient-of-neural-network-in-flux-jl/46062 "2020-09-05T17:27:09Z")

</div>

This is my neural network: net = Chain(Dense(6, 16, relu), Dense(16, 16, relu), Dense(16, 8)) Consider that I have a function like: f(x) = sum(net(x)) If I want to stop taking gradient of f(x) with respect to x, I on…

---

## [How register a function in JuMP and use a subarray as args](https://discourse.julialang.org/t/how-register-a-function-in-jump-and-use-a-subarray-as-args/46043)

<div class="topic-metadata">

**Author:** [@Behemoth-s](https://discourse.julialang.org/u/Behemoth-s)\
**Replies:** 2\
**Last updated:** [September 5, 2020, 5:26pm UTC](https://discourse.julialang.org/t/how-register-a-function-in-jump-and-use-a-subarray-as-args/46043 "2020-09-05T17:26:47Z")

</div>

I would register constraint somehow like c1 as a user-defined function using Ipopt using JuMP using MathOptInterface const MOI = MathOptInterface d1 = 4 d2 = 5 d3 = 6 para\_a = rand(d3) m = Model(optimizer\_with\_attrib…

---

## [Base.Filesystem concurrency for separate julia instances](https://discourse.julialang.org/t/base-filesystem-concurrency-for-separate-julia-instances/46113)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 0\
**Last updated:** [September 5, 2020, 5:09pm UTC](https://discourse.julialang.org/t/base-filesystem-concurrency-for-separate-julia-instances/46113 "2020-09-05T17:09:57Z")

</div>

The following MWE indicates that within a single julia instance: concurrent access to (thread-specific) sub-arrays is fine threaded IO via Base.Filesystem is fine N = 2^20 checklens = Array{Array{Int64,1},1}(undef,Thr…

---

## [Struggling to interpret spherical harmonic transforms from FastTransforms.jl](https://discourse.julialang.org/t/struggling-to-interpret-spherical-harmonic-transforms-from-fasttransforms-jl/45986)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 3\
**Last updated:** [September 5, 2020, 3:30pm UTC](https://discourse.julialang.org/t/struggling-to-interpret-spherical-harmonic-transforms-from-fasttransforms-jl/45986 "2020-09-05T15:30:57Z")

</div>

I am trying to compute the spherical harmonic transform of a function that is given by sin(θ)cos(ϕ) on the face of the sphere facing us, and zero on the other face that is away from us. I am attempting to use FastTransfo…

---

## [Is there any limitation on threads' num for cpu without SMT？](https://discourse.julialang.org/t/is-there-any-limitation-on-threads-num-for-cpu-without-smt/46104)

<div class="topic-metadata">

**Author:** [@N5N3](https://discourse.julialang.org/u/N5N3)\
**Replies:** 2\
**Last updated:** [September 5, 2020, 3:01pm UTC](https://discourse.julialang.org/t/is-there-any-limitation-on-threads-num-for-cpu-without-smt/46104 "2020-09-05T15:01:52Z")

</div>

I’m using 9600KF with 6 cores and 6 threads, the following confuse me: If I start julia with 6 threads, then the cost of schedule(t::Task) = enq\_work(t) increases sharply somtime, while everythings seems ok with thread…

---

## [Power of a given value into CUDA.jl kernel](https://discourse.julialang.org/t/power-of-a-given-value-into-cuda-jl-kernel/46082)

<div class="topic-metadata">

**Author:** [@eufosc](https://discourse.julialang.org/u/eufosc)\
**Replies:** 2\
**Last updated:** [September 5, 2020, 2:54pm UTC](https://discourse.julialang.org/t/power-of-a-given-value-into-cuda-jl-kernel/46082 "2020-09-05T14:54:02Z")

</div>

Hi! I’m using Julia V1.4.2 + CUDA.jl and I have an issue with a CUDA kernel. I’m trying to power the elements of an array, just like the example below: using CUDA T = \[0.0 0.666667 0.0; -0.333333 -0.25 0.333333; -0.5…

---

## [How to treat variable as binary in some points of model?](https://discourse.julialang.org/t/how-to-treat-variable-as-binary-in-some-points-of-model/46100)

<div class="topic-metadata">

**Author:** [@sogrbilja](https://discourse.julialang.org/u/sogrbilja)\
**Replies:** 3\
**Last updated:** [September 5, 2020, 2:50pm UTC](https://discourse.julialang.org/t/how-to-treat-variable-as-binary-in-some-points-of-model/46100 "2020-09-05T14:50:16Z")

</div>

I have a decision variable PRODAMOUNT and it is of Int type. I need it as binary in some points of the model, like here in the objective function second PRODAMOUNT should be used as 1 when there is a positive value in it…

---

## [1d arrays vs 1-column matrices](https://discourse.julialang.org/t/1d-arrays-vs-1-column-matrices/46101)

<div class="topic-metadata">

**Author:** [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Replies:** 7\
**Last updated:** [September 5, 2020, 6:57am UTC](https://discourse.julialang.org/t/1d-arrays-vs-1-column-matrices/46101 "2020-09-05T06:57:51Z")

</div>

Does this mean that storing vectors as x(n,) rather than x(n,1) has performance benefits?

---

## [Vector adjoint and indexing don't commute?](https://discourse.julialang.org/t/vector-adjoint-and-indexing-dont-commute/45980)

<div class="topic-metadata">

**Author:** [@timmor](https://discourse.julialang.org/u/timmor)\
**Replies:** 19\
**Last updated:** [September 5, 2020, 12:29pm UTC](https://discourse.julialang.org/t/vector-adjoint-and-indexing-dont-commute/45980 "2020-09-05T12:29:19Z")

</div>

I was surprised that vector adjoint doesn’t commute with indexing. x = \[1:5;\] x\[1:3\]' # is a 1x3 Adjoint x'\[1:3\] # is a 3 element Vector For example if I set y = x' my mental model of y is “row vector”, and I was think…

---

## [Force ordering in LightXML?](https://discourse.julialang.org/t/force-ordering-in-lightxml/46079)

<div class="topic-metadata">

**Author:** [@Ahmed\_Salih](https://discourse.julialang.org/u/Ahmed_Salih)\
**Replies:** 3\
**Last updated:** [September 5, 2020, 12:22pm UTC](https://discourse.julialang.org/t/force-ordering-in-lightxml/46079 "2020-09-05T12:22:33Z")

</div>

Hello! Using LightXML my understanding has been that it is in alphabetical order, but for some reason not in this case: And the code is entered as: :gravity=\>Dict("x"=\>0,"y"=\>0,"z"=\>-9.8065) Would anyone happen to…

---

## [Is Julia Array an array or linked list?](https://discourse.julialang.org/t/is-julia-array-an-array-or-linked-list/34954)

<div class="topic-metadata">

**Author:** [@Sijun](https://discourse.julialang.org/u/Sijun)\
**Replies:** 7\
**Last updated:** [September 5, 2020, 11:26am UTC](https://discourse.julialang.org/t/is-julia-array-an-array-or-linked-list/34954 "2020-09-05T11:26:33Z")

</div>

My understanding is that a data structure cannot be an array for random access and a linked list for sequential access at the same time. There must be two different data structures for dedicated purposes. But the follow…

---

## [Error: Problems with using VectorOfArray() with DifferentialEquations package](https://discourse.julialang.org/t/error-problems-with-using-vectorofarray-with-differentialequations-package/46049)

<div class="topic-metadata">

**Author:** [@MJMAG](https://discourse.julialang.org/u/MJMAG)\
**Replies:** 4\
**Last updated:** [September 5, 2020, 11:13am UTC](https://discourse.julialang.org/t/error-problems-with-using-vectorofarray-with-differentialequations-package/46049 "2020-09-05T11:13:32Z")

</div>

Hey there, I am new to the community. I don’t have too much experience with the DifferentialEquations package. I am trying to model Lotka Volterra dynamics with two guilds and in these guilds various species. For this…

---

## [Custom node dependent \`nodesize\`](https://discourse.julialang.org/t/custom-node-dependent-nodesize/46098)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 0\
**Last updated:** [September 5, 2020, 11:09am UTC](https://discourse.julialang.org/t/custom-node-dependent-nodesize/46098 "2020-09-05T11:09:13Z")

</div>

Is it possible to use a custom method to compute the node size for a tree? using AbstractTrees, Plots, GraphRecipes mutable struct BinaryNode{T} data::T parent::BinaryNode{T} left::BinaryNode{T} right::…

---

## [Shared base library for PPL](https://discourse.julialang.org/t/shared-base-library-for-ppl/45901)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 9\
**Last updated:** [September 5, 2020, 8:29am UTC](https://discourse.julialang.org/t/shared-base-library-for-ppl/45901 "2020-09-05T08:29:40Z")

</div>

Hong Ge (are you on Disourse?) recently posted this comment in the probprog channel on Slack: …I think it is quite helpful to consider carefully how we, as a community, can work together to build a better platform for …

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

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