# Latest

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

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

**Page:** 1564

---

## [Mutating function works in REPL but has no effect in tests](https://discourse.julialang.org/t/mutating-function-works-in-repl-but-has-no-effect-in-tests/50728)

<div class="topic-metadata">

**Author:** [@mdneuzerling](https://discourse.julialang.org/u/mdneuzerling)\
**Replies:** 2\
**Last updated:** [November 25, 2020, 5:56am UTC](https://discourse.julialang.org/t/mutating-function-works-in-repl-but-has-no-effect-in-tests/50728 "2020-11-25T05:56:29Z")

</div>

Hi folks, I thought I’d see how far I could get at creating a Prometheus client for Julia, to cut my teeth and learn about package development. This involves juggling stateful objects (metrics) which are mutated in plac…

---

## [3d Plots using Plots.jl](https://discourse.julialang.org/t/3d-plots-using-plots-jl/50723)

<div class="topic-metadata">

**Author:** [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)\
**Replies:** 1\
**Last updated:** [November 25, 2020, 4:23am UTC](https://discourse.julialang.org/t/3d-plots-using-plots-jl/50723 "2020-11-25T04:23:06Z")

</div>

If I have a function using Plots f(x,c)=x^2+6x+(c/x) how do I make it into a 3d plot like a topographic map?

---

## [Reading text or csv files and assigning values to variable names](https://discourse.julialang.org/t/reading-text-or-csv-files-and-assigning-values-to-variable-names/50610)

<div class="topic-metadata">

**Author:** [@Peter-Jolly](https://discourse.julialang.org/u/Peter-Jolly)\
**Replies:** 24\
**Last updated:** [November 25, 2020, 3:12am UTC](https://discourse.julialang.org/t/reading-text-or-csv-files-and-assigning-values-to-variable-names/50610 "2020-11-25T03:12:09Z")

</div>

Hi, I have several large text files write out from a VBA program. The files contain numbers only (integers, floating point). I want to read these files into a Julia program. In FORTRAN or VBA you would just use Read(“Fil…

---

## [Defining and input signal for a differential equation](https://discourse.julialang.org/t/defining-and-input-signal-for-a-differential-equation/23703)

<div class="topic-metadata">

**Author:** [@mllera14](https://discourse.julialang.org/u/mllera14)\
**Replies:** 18\
**Last updated:** [November 25, 2020, 2:45am UTC](https://discourse.julialang.org/t/defining-and-input-signal-for-a-differential-equation/23703 "2020-11-25T02:45:05Z")

</div>

I’m trying to use the DiffEqFlux package to define a machine learning model for a differential equation. The model I want needs to work similar to a Nueral ODE, but with latent variables. So I have the following: \\frac…

---

## [Unable to retrieve solution after solving JuMP model](https://discourse.julialang.org/t/unable-to-retrieve-solution-after-solving-jump-model/50720)

<div class="topic-metadata">

**Author:** [@trathi](https://discourse.julialang.org/u/trathi)\
**Replies:** 2\
**Last updated:** [November 25, 2020, 1:41am UTC](https://discourse.julialang.org/t/unable-to-retrieve-solution-after-solving-jump-model/50720 "2020-11-25T01:41:58Z")

</div>

I have a large code that solves an optimization model. To keep the code clean I am trying to move the part that calls the optimizer and retrieve solution to a separate function. Even though I am able to solve the model t…

---

## [DiffEqFlux.sciml\_train giving UndefVarError: ProgressLogging not defined](https://discourse.julialang.org/t/diffeqflux-sciml-train-giving-undefvarerror-progresslogging-not-defined/45478)

<div class="topic-metadata">

**Author:** [@anon22248738](https://discourse.julialang.org/u/anon22248738)\
**Replies:** 7\
**Last updated:** [November 25, 2020, 1:31am UTC](https://discourse.julialang.org/t/diffeqflux-sciml-train-giving-undefvarerror-progresslogging-not-defined/45478 "2020-11-25T01:31:10Z")

</div>

When running the Optimization of Ordinary Differential Equations tutorial in the DiffEqFlux documentation, I get the following error ERROR: LoadError: UndefVarError: ProgressLogging not defined Stacktrace: \[1\] default\_…

---

## [Julia equivalent of class methods?](https://discourse.julialang.org/t/julia-equivalent-of-class-methods/50714)

<div class="topic-metadata">

**Author:** [@paulmelis](https://discourse.julialang.org/u/paulmelis)\
**Replies:** 3\
**Last updated:** [November 25, 2020, 1:22am UTC](https://discourse.julialang.org/t/julia-equivalent-of-class-methods/50714 "2020-11-25T01:22:28Z")

</div>

I’m translating some Python code to Julia and am trying to figure out how to map the usage of class methods to Julia. See below for a Python-style outline of what I’m porting. There’s a single abstract class with one or …

---

## [Latest version of docs not published (github actions/TagBot)](https://discourse.julialang.org/t/latest-version-of-docs-not-published-github-actions-tagbot/50634)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 24\
**Last updated:** [November 24, 2020, 10:43pm UTC](https://discourse.julialang.org/t/latest-version-of-docs-not-published-github-actions-tagbot/50634 "2020-11-24T22:43:29Z")

</div>

I released some days ago a new stable version of a package. The TagBot created the tag correctly, but the docs of the stable version were not released, and keep pointing to the previous version. The CI run of the docume…

---

## [Specialize to vector with specified dimension](https://discourse.julialang.org/t/specialize-to-vector-with-specified-dimension/50711)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 4\
**Last updated:** [November 24, 2020, 10:24pm UTC](https://discourse.julialang.org/t/specialize-to-vector-with-specified-dimension/50711 "2020-11-24T22:24:10Z")

</div>

In my move to Julia one thing that I go back and forth is on the type annotation of function parameters. One particular case is when a function can accept vectors of any type of numbers, but those vectors must be of a sp…

---

## [JuMP: Register arbitary number of functions and use as constraints](https://discourse.julialang.org/t/jump-register-arbitary-number-of-functions-and-use-as-constraints/19692)

<div class="topic-metadata">

**Author:** [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Replies:** 7\
**Last updated:** [November 24, 2020, 10:01pm UTC](https://discourse.julialang.org/t/jump-register-arbitary-number-of-functions-and-use-as-constraints/19692 "2020-11-24T22:01:29Z")

</div>

I am doing some optimisation, the problems all look the same but the number of variables differ. I am trying to create a function which will do the optimisation problem in one line (optimise\_this(some\_problem)). The prob…

---

## [Using multiple modules in a package](https://discourse.julialang.org/t/using-multiple-modules-in-a-package/50705)

<div class="topic-metadata">

**Author:** [@GlenHenshaw](https://discourse.julialang.org/u/GlenHenshaw)\
**Replies:** 2\
**Last updated:** [November 24, 2020, 9:14pm UTC](https://discourse.julialang.org/t/using-multiple-modules-in-a-package/50705 "2020-11-24T21:14:39Z")

</div>

I’ve been coding in Julia for a while but only recently have I started developing packages. Right now I’ve activated a new environment, called A. Environment A wants to define a package, also called A, and so there is a …

---

## [Character n-grams in array](https://discourse.julialang.org/t/character-n-grams-in-array/50630)

<div class="topic-metadata">

**Author:** [@lorb24](https://discourse.julialang.org/u/lorb24)\
**Replies:** 6\
**Last updated:** [November 24, 2020, 8:28pm UTC](https://discourse.julialang.org/t/character-n-grams-in-array/50630 "2020-11-24T20:28:37Z")

</div>

I’m trying to get the character n-grams for a list of words. For example: julia\> s = "apple" julia\> s=reduce(vcat, permutedims.(collect.(s))) \['a', 'p', 'p', 'l', 'e'\] julia\> ngram(s,n) = join(\[view(s,i:i+n-1) for i=1:l…

---

## [Approximating A+B\*log with NeuralNetwork](https://discourse.julialang.org/t/approximating-a-b-log-with-neuralnetwork/50709)

<div class="topic-metadata">

**Author:** [@Honza9723](https://discourse.julialang.org/u/Honza9723)\
**Replies:** 0\
**Last updated:** [November 24, 2020, 7:57pm UTC](https://discourse.julialang.org/t/approximating-a-b-log-with-neuralnetwork/50709 "2020-11-24T19:57:22Z")

</div>

Dear All, I am working on an economics project which utilizes neural networks as a method for approximation of model solutions (those models are systems of differential/difference equations). For some versions of these …

---

## [Sum of Any - Why sum of empty set is not zero?](https://discourse.julialang.org/t/sum-of-any-why-sum-of-empty-set-is-not-zero/50706)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 5\
**Last updated:** [November 24, 2020, 7:57pm UTC](https://discourse.julialang.org/t/sum-of-any-why-sum-of-empty-set-is-not-zero/50706 "2020-11-24T19:57:19Z")

</div>

Why sum of empty set is not zero ? julia\> eltype(dane) Any julia\> sum(dane\[:,9\]) 6.54132454e8 julia\> dane\[(mies20) .& (dane\[:,7\].==dealerzy\[1\]),9\] 1-element Array{Any,1}: 2032.0 julia\> dane\[(mies20) .& (dane\[:,7\].==dea…

---

## [Setting correctly package dependencies](https://discourse.julialang.org/t/setting-correctly-package-dependencies/50703)

<div class="topic-metadata">

**Author:** [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Replies:** 9\
**Last updated:** [November 24, 2020, 6:24pm UTC](https://discourse.julialang.org/t/setting-correctly-package-dependencies/50703 "2020-11-24T18:24:44Z")

</div>

Hey, I’m starting the developpement of a package, and i have errors in the CI that i dont get on my machine, without me understanding how to fix them. Look at the log there. Seems like some package ‘Artifacts’ has cont…

---

## [Casting \`Vector{Complex{T}}\` to \`Vector{T}\` of twice the size](https://discourse.julialang.org/t/casting-vector-complex-t-to-vector-t-of-twice-the-size/50689)

<div class="topic-metadata">

**Author:** [@jlbosse](https://discourse.julialang.org/u/jlbosse)\
**Replies:** 3\
**Last updated:** [November 24, 2020, 6:14pm UTC](https://discourse.julialang.org/t/casting-vector-complex-t-to-vector-t-of-twice-the-size/50689 "2020-11-24T18:14:49Z")

</div>

I have an Vector of complex numbers and want to interpret it as a vector of real numbers with twice the length. Currently I allocate a new vector and then manually fill it, but I wonder if there is a faster way without …

---

## [How to debug inlining fails?](https://discourse.julialang.org/t/how-to-debug-inlining-fails/50658)

<div class="topic-metadata">

**Author:** [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)\
**Replies:** 1\
**Last updated:** [November 24, 2020, 6:11pm UTC](https://discourse.julialang.org/t/how-to-debug-inlining-fails/50658 "2020-11-24T18:11:23Z")

</div>

I have a trait based system in LazyArrays.jl that isn’t inlining, which seems to be breaking type inference. Are there any tips for debugging why this is? Sorry for the non-MWE but the code is below. For some reason @i…

---

## [Problem saving SharedArrays with JLD type](https://discourse.julialang.org/t/problem-saving-sharedarrays-with-jld-type/44754)

<div class="topic-metadata">

**Author:** [@gideonsimpson](https://discourse.julialang.org/u/gideonsimpson)\
**Replies:** 3\
**Last updated:** [November 24, 2020, 5:10pm UTC](https://discourse.julialang.org/t/problem-saving-sharedarrays-with-jld-type/44754 "2020-11-24T17:10:32Z")

</div>

I’ve got the following issue. I generate data using the Distributed module, storing it in a SharedArray, and then dumping it to disk via FileIO. The problem I have is that if I save it as .jld when I try to load back i…

---

## [Distributed Or , julia logicals operators](https://discourse.julialang.org/t/distributed-or-julia-logicals-operators/50698)

<div class="topic-metadata">

**Author:** [@rapasite](https://discourse.julialang.org/u/rapasite)\
**Replies:** 0\
**Last updated:** [November 24, 2020, 5:03pm UTC](https://discourse.julialang.org/t/distributed-or-julia-logicals-operators/50698 "2020-11-24T17:03:25Z")

</div>

I asked a question on https://julialang.org/slack/. Question was: Is there any way to write something like x == (4 | 5) witch return true if x == 4 or if x == 5? The regular answer is: x in (4,5) or any other way …

---

## [oneAPI.jl @sync bug?](https://discourse.julialang.org/t/oneapi-jl-sync-bug/50696)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 3\
**Last updated:** [November 24, 2020, 4:38pm UTC](https://discourse.julialang.org/t/oneapi-jl-sync-bug/50696 "2020-11-24T16:38:48Z")

</div>

Hi, I am trying the oneAPI.jl package and I have an issue with timing: The following MWE gives me incredible speed-ups and I guess that oneAPI.@sync may not work properly… using oneAPI using BenchmarkTools n=2^25 on…

---

## [Julia REPL flow coming from Matlab](https://discourse.julialang.org/t/julia-repl-flow-coming-from-matlab/50499)

<div class="topic-metadata">

**Author:** [@danilo-bc](https://discourse.julialang.org/u/danilo-bc)\
**Replies:** 12\
**Last updated:** [November 24, 2020, 4:35pm UTC](https://discourse.julialang.org/t/julia-repl-flow-coming-from-matlab/50499 "2020-11-24T16:35:50Z")

</div>

Hi, I’m new to the Julia community and I have a question about how to use REPL to interface with my scripts. In Matlab, it’s easy to get into a folder and, for example, set a sequence of scripts called A.m B.m and C.m. …

---

## [Declaring multiple variables as local](https://discourse.julialang.org/t/declaring-multiple-variables-as-local/50695)

<div class="topic-metadata">

**Author:** [@4aHxKzD](https://discourse.julialang.org/u/4aHxKzD)\
**Replies:** 2\
**Last updated:** [November 24, 2020, 4:16pm UTC](https://discourse.julialang.org/t/declaring-multiple-variables-as-local/50695 "2020-11-24T16:16:07Z")

</div>

Is there another way of declaring multiple variables as local, instead of writing for example: function f() local a local b local c local d while true # do stuff with a,b,c,d if some\_…

---

## [Abc\_inference with parallel = true gives error in DifferentialEquations.jl](https://discourse.julialang.org/t/abc-inference-with-parallel-true-gives-error-in-differentialequations-jl/50681)

<div class="topic-metadata">

**Author:** [@claudio20497](https://discourse.julialang.org/u/claudio20497)\
**Replies:** 2\
**Last updated:** [November 24, 2020, 3:56pm UTC](https://discourse.julialang.org/t/abc-inference-with-parallel-true-gives-error-in-differentialequations-jl/50681 "2020-11-24T15:56:59Z")

</div>

Hello, I get a strange error when setting parallel = true in abc\_inference. So I start by opening a julia REPL, enable julia to use multiple cores and launch jupyterlab: |julia\> ENV\["JULIA\_NUM\_THREADS"\] = 5 5 |julia\> …

---

## [Iterative, looping split-apply-combines in Julia](https://discourse.julialang.org/t/iterative-looping-split-apply-combines-in-julia/50654)

<div class="topic-metadata">

**Author:** [@newtojulia1](https://discourse.julialang.org/u/newtojulia1)\
**Replies:** 17\
**Last updated:** [November 24, 2020, 3:45pm UTC](https://discourse.julialang.org/t/iterative-looping-split-apply-combines-in-julia/50654 "2020-11-24T15:45:19Z")

</div>

I am new to Julia (and the forum - apologies on my formatting!) and struggling to implement complex split-apply-combine functions, in particular when these involve iterative looping across columns. I could really use som…

---

## [Differential Equations Solve - top not defined](https://discourse.julialang.org/t/differential-equations-solve-top-not-defined/44510)

<div class="topic-metadata">

**Author:** [@totorotoby](https://discourse.julialang.org/u/totorotoby)\
**Replies:** 21\
**Last updated:** [November 24, 2020, 2:57pm UTC](https://discourse.julialang.org/t/differential-equations-solve-top-not-defined/44510 "2020-11-24T14:57:24Z")

</div>

When running using DifferentialEquations f(u,p,t) = 1.01\*u u0 = 1/2 tspan = (0.0,1.0) prob = ODEProblem(f,u0,tspan) sol = solve(prob, Tsit5(), reltol=1e-8, abstol=1e-8) As taken off the DifferentialEquations.jl Documen…

---

## [Questions on bit-field like type](https://discourse.julialang.org/t/questions-on-bit-field-like-type/50684)

<div class="topic-metadata">

**Author:** [@paulmelis](https://discourse.julialang.org/u/paulmelis)\
**Replies:** 5\
**Last updated:** [November 24, 2020, 2:48pm UTC](https://discourse.julialang.org/t/questions-on-bit-field-like-type/50684 "2020-11-24T14:48:37Z")

</div>

I’m trying to understand the below behaviour (MWE reduced from a larger set of code). I define an alias for UInt8 called CompositeValue with the intention of storing two values of 4 bits in a single UInt8 in such a way t…

---

## [Fun Animations](https://discourse.julialang.org/t/fun-animations/45542)

<div class="topic-metadata">

**Author:** [@anon92994695](https://discourse.julialang.org/u/anon92994695)\
**Replies:** 8\
**Last updated:** [November 24, 2020, 2:34pm UTC](https://discourse.julialang.org/t/fun-animations/45542 "2020-11-24T14:34:20Z")

</div>

Figured I’d try out another weird thread idea. The idea is: if you have a fun animation share it below. Discussions about animations welcome, but being a jerk is not. Doesn’t need to be cream of the crop highly polished,…

---

## [Installing a Pkg](https://discourse.julialang.org/t/installing-a-pkg/50661)

<div class="topic-metadata">

**Author:** [@Alekey\_St](https://discourse.julialang.org/u/Alekey_St)\
**Replies:** 2\
**Last updated:** [November 24, 2020, 1:04pm UTC](https://discourse.julialang.org/t/installing-a-pkg/50661 "2020-11-24T13:04:10Z")

</div>

Hi! I’ve tried several times to install the Distributions Pkg. I’m using the 1.5.3 Julia version, and every time I’m tring to add it, there’s an ERROR message. I’ve tried from the pkg enviroment with the commands add…

---

## [Error: JuMP model variable not defined](https://discourse.julialang.org/t/error-jump-model-variable-not-defined/50670)

<div class="topic-metadata">

**Author:** [@trathi](https://discourse.julialang.org/u/trathi)\
**Replies:** 5\
**Last updated:** [November 24, 2020, 12:22pm UTC](https://discourse.julialang.org/t/error-jump-model-variable-not-defined/50670 "2020-11-24T12:22:24Z")

</div>

I am trying to use the package Dualization.jl, to reformulate a primal problem and solving the dual model separately. However, after solving I am not able to access the solution (the variable values) as they don’t seem t…

---

## [Parallel simulations on multiple cores on Azure](https://discourse.julialang.org/t/parallel-simulations-on-multiple-cores-on-azure/50680)

<div class="topic-metadata">

**Author:** [@maxpiot](https://discourse.julialang.org/u/maxpiot)\
**Replies:** 0\
**Last updated:** [November 24, 2020, 11:46am UTC](https://discourse.julialang.org/t/parallel-simulations-on-multiple-cores-on-azure/50680 "2020-11-24T11:46:11Z")

</div>

I have some fairly computationally intensive simulation code that I would like to run across multiple cores, (independently, only combining data at the end of a simulation). Currently I run this on my PC, using the pmap …

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

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