# Latest

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

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

**Page:** 1176

---

## [Inference problem with findall](https://discourse.julialang.org/t/inference-problem-with-findall/73262)

<div class="topic-metadata">

**Author:** [@etienne\_dg](https://discourse.julialang.org/u/etienne_dg)\
**Replies:** 5\
**Last updated:** [December 17, 2021, 2:38pm UTC](https://discourse.julialang.org/t/inference-problem-with-findall/73262 "2021-12-17T14:38:06Z")

</div>

Hi, the following code is not correctly inferred in julia 1.7.0. function test() k = 1 if k == 1 k = 2 end return findall(x -\> x \>= k, \[1\]) end julia\> @code\_warntype(test()) MethodInstance for t…

---

## [Channel take if available](https://discourse.julialang.org/t/channel-take-if-available/73252)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 1\
**Last updated:** [December 17, 2021, 1:55pm UTC](https://discourse.julialang.org/t/channel-take-if-available/73252 "2021-12-17T13:55:54Z")

</div>

Hi all :slight\_smile: Is there a way to take an element from a Channel if and only if there are elements available. This should be non blocking. I could do something like: julia\> c = Channel(10) Channel{Any}(10) (empt…

---

## [Setup \`@benchmark\` inside function: setup not defined](https://discourse.julialang.org/t/setup-benchmark-inside-function-setup-not-defined/73251)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 5\
**Last updated:** [December 17, 2021, 1:42pm UTC](https://discourse.julialang.org/t/setup-benchmark-inside-function-setup-not-defined/73251 "2021-12-17T13:42:43Z")

</div>

Why am I getting this error? And how to setup a benchmark inside a function? In the global scope this works: julia\> using BenchmarkTools julia\> let a = rand(10) setup = begin x = d…

---

## [Memory allocation with \`view\` and array assignment](https://discourse.julialang.org/t/memory-allocation-with-view-and-array-assignment/67109)

<div class="topic-metadata">

**Author:** [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Replies:** 12\
**Last updated:** [December 17, 2021, 1:19pm UTC](https://discourse.julialang.org/t/memory-allocation-with-view-and-array-assignment/67109 "2021-12-17T13:19:17Z")

</div>

Hey, I was wondering about this code: julia\> x = randn((2048, 2048)); julia\> z = copy(x); julia\> using BenchmarkTools julia\> @btime $z\[2:2000, 2:2000\] = view($x, 2:2000, 2:2000); 5.386 ms (0 allocations: 0 bytes) …

---

## [Identical Random number generation in a DataFrame based on row categories](https://discourse.julialang.org/t/identical-random-number-generation-in-a-dataframe-based-on-row-categories/73247)

<div class="topic-metadata">

**Author:** [@CompulsoryCoffee](https://discourse.julialang.org/u/CompulsoryCoffee)\
**Replies:** 9\
**Last updated:** [December 17, 2021, 12:17pm UTC](https://discourse.julialang.org/t/identical-random-number-generation-in-a-dataframe-based-on-row-categories/73247 "2021-12-17T12:17:03Z")

</div>

Hi, I am trying to generate random numbers in a DataFrame that would be identical for the same categories. for example: │ Row │ id │ type │ mean │ std │ │ │ String │ String │ Float64 │ Float64 │ ├────…

---

## [Round float addition](https://discourse.julialang.org/t/round-float-addition/73130)

<div class="topic-metadata">

**Author:** [@n90](https://discourse.julialang.org/u/n90)\
**Replies:** 9\
**Last updated:** [December 17, 2021, 10:55am UTC](https://discourse.julialang.org/t/round-float-addition/73130 "2021-12-17T10:55:50Z")

</div>

Can I round 0.1 + 0.2 to 0.30 not the default 0.30000000000000004 in Julia.

---

## [Very special RNG](https://discourse.julialang.org/t/very-special-rng/73242)

<div class="topic-metadata">

**Author:** [@wildart](https://discourse.julialang.org/u/wildart)\
**Replies:** 3\
**Last updated:** [December 17, 2021, 10:37am UTC](https://discourse.julialang.org/t/very-special-rng/73242 "2021-12-17T10:37:09Z")

</div>

Recently, I’ve seen an issue that mentioned using a “special” random number generator from XKCD-221. Unfortunately, I do not remember where it was. But, if you need such RNG, you can get it from here: Xkcd221.jl. It’s …

---

## [Stipple: ReactiveModel type Name has no field channel\_\_](https://discourse.julialang.org/t/stipple-reactivemodel-type-name-has-no-field-channel/73159)

<div class="topic-metadata">

**Author:** [@mde](https://discourse.julialang.org/u/mde)\
**Replies:** 1\
**Last updated:** [December 17, 2021, 10:12am UTC](https://discourse.julialang.org/t/stipple-reactivemodel-type-name-has-no-field-channel/73159 "2021-12-17T10:12:47Z")

</div>

Using the HelloStipple example (or any other), I get the following error when trying to run it. Additionally, there is a warning that the init method used is deprecated, but I cannot find any documentation of the updated…

---

## [Can I print an array without type?](https://discourse.julialang.org/t/can-i-print-an-array-without-type/73236)

<div class="topic-metadata">

**Author:** [@Xiao](https://discourse.julialang.org/u/Xiao)\
**Replies:** 14\
**Last updated:** [December 17, 2021, 9:17am UTC](https://discourse.julialang.org/t/can-i-print-an-array-without-type/73236 "2021-12-17T09:17:47Z")

</div>

RT. julia\> A = \[\] Any\[\] julia\> push!(A, "a") 1-element Vector{Any}: "a" julia\> push!(A, "b") 2-element Vector{Any}: "a" "b" julia\> println(A) Any\["a", "b"\] How can I print A as \[“a”, “b”\], without Any? Thank you! …

---

## [Database System Engineer at RelationalAI](https://discourse.julialang.org/t/database-system-engineer-at-relationalai/73250)

<div class="topic-metadata">

**Author:** [@Malte](https://discourse.julialang.org/u/Malte)\
**Replies:** 0\
**Last updated:** [December 17, 2021, 8:50am UTC](https://discourse.julialang.org/t/database-system-engineer-at-relationalai/73250 "2021-12-17T08:50:54Z")

</div>

Hi all Our database system engineer job description at RelationalAI is live. Please see the link for more information and how to apply. Happy holidays!

---

## [Parameter identification with Optim.jl to optimize a first order output error-model](https://discourse.julialang.org/t/parameter-identification-with-optim-jl-to-optimize-a-first-order-output-error-model/73218)

<div class="topic-metadata">

**Author:** [@Volker](https://discourse.julialang.org/u/Volker)\
**Replies:** 2\
**Last updated:** [December 17, 2021, 7:43am UTC](https://discourse.julialang.org/t/parameter-identification-with-optim-jl-to-optimize-a-first-order-output-error-model/73218 "2021-12-17T07:43:36Z")

</div>

Hello, I would like to start with Optim.jl to optimize some dynamical systems. The following code should optmize the parameters of a linear output error model which approximates a nonlinear system. using Optim functio…

---

## [Makie: Labels are bold face](https://discourse.julialang.org/t/makie-labels-are-bold-face/73205)

<div class="topic-metadata">

**Author:** [@Kevin\_Kleinbeck](https://discourse.julialang.org/u/Kevin_Kleinbeck)\
**Replies:** 2\
**Last updated:** [December 17, 2021, 6:41am UTC](https://discourse.julialang.org/t/makie-labels-are-bold-face/73205 "2021-12-17T06:41:58Z")

</div>

Consider the figure Somehow the \\gamma\_d labels are displayed as bold face, even though there is no other font or so specified. The axis labels and the titles are created with latex strings during the creation of the…

---

## [Donating to Julia, not working?](https://discourse.julialang.org/t/donating-to-julia-not-working/73226)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 7\
**Last updated:** [December 17, 2021, 6:36am UTC](https://discourse.julialang.org/t/donating-to-julia-not-working/73226 "2021-12-17T06:36:32Z")

</div>

If I go here, and click on the donate to julia button, the page just reloads. I clicked to donate on the top menu bar, but I think I just donated to NumFocus in general. Sure, I support NumFocus in general, but I actuall…

---

## [New package DependentBootstrap](https://discourse.julialang.org/t/new-package-dependentbootstrap/312)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 3\
**Last updated:** [December 17, 2021, 4:09am UTC](https://discourse.julialang.org/t/new-package-dependentbootstrap/312 "2021-12-17T04:09:47Z")

</div>

Hi all, A little under a year ago I wrote a package that implements various dependent bootstrap and block length selection methodologies in Julia, but didn’t register it. I’ve been using it for the past year, and based …

---

## [A plea for int overflow checking as the default](https://discourse.julialang.org/t/a-plea-for-int-overflow-checking-as-the-default/3338)

<div class="topic-metadata">

**Author:** [@nickeubank](https://discourse.julialang.org/u/nickeubank)\
**Replies:** 79\
**Last updated:** [December 17, 2021, 2:18am UTC](https://discourse.julialang.org/t/a-plea-for-int-overflow-checking-as-the-default/3338 "2021-12-17T02:18:36Z")

</div>

Hello JuliaLang Community! I am a social scientist making his way from the Python ecosystem (mostly numpy & pandas) to Julia, and have in general been delighted by the language – concise, generally quite readable, and p…

---

## [How to stack up multiple 3-dimension matrices into one?](https://discourse.julialang.org/t/how-to-stack-up-multiple-3-dimension-matrices-into-one/73225)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 8\
**Last updated:** [December 17, 2021, 12:20am UTC](https://discourse.julialang.org/t/how-to-stack-up-multiple-3-dimension-matrices-into-one/73225 "2021-12-17T00:20:53Z")

</div>

For example, I could have 10 Matrices like the below (A) stored in 10 NetCDF files: A = rand(5, 3, 2); My goal is to read them all out and stack them up into a new matrix B with the size of size(B) = (5, 3, 20). I tri…

---

## [Replacing missing values in a matrix is super slow](https://discourse.julialang.org/t/replacing-missing-values-in-a-matrix-is-super-slow/73213)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 38\
**Last updated:** [December 17, 2021, 12:50am UTC](https://discourse.julialang.org/t/replacing-missing-values-in-a-matrix-is-super-slow/73213 "2021-12-17T00:50:46Z")

</div>

I have a matrix with the size of 360x180x1200. It contains lots of values that are equal to 100000002004087734272. I assume those are missing value indicators. I tried to use the below command to replace them with NaNs,…

---

## [Can PyPlot generate plots from multiple threads?](https://discourse.julialang.org/t/can-pyplot-generate-plots-from-multiple-threads/68876)

<div class="topic-metadata">

**Author:** [@g2g](https://discourse.julialang.org/u/g2g)\
**Replies:** 4\
**Last updated:** [December 17, 2021, 12:39am UTC](https://discourse.julialang.org/t/can-pyplot-generate-plots-from-multiple-threads/68876 "2021-12-17T00:39:47Z")

</div>

I’m new to Julia but already impressed because Julia is 4x faster than GNU Octave at generating the approximately 6000 frames of a 3D plot animation (30 minutes versus 120 minutes) I am making. I am hoping to be able to …

---

## [Package metrics](https://discourse.julialang.org/t/package-metrics/73235)

<div class="topic-metadata">

**Author:** [@hros](https://discourse.julialang.org/u/hros)\
**Replies:** 0\
**Last updated:** [December 17, 2021, 12:11am UTC](https://discourse.julialang.org/t/package-metrics/73235 "2021-12-17T00:11:05Z")

</div>

As @logankilpatrick notes in his recent blog post, the package manager is one of the best features of Julia. There are many well known, and actively developed packages. However, there are some packages which are either…

---

## [Summation for an estimate of pi](https://discourse.julialang.org/t/summation-for-an-estimate-of-pi/73232)

<div class="topic-metadata">

**Author:** [@fbal091](https://discourse.julialang.org/u/fbal091)\
**Replies:** 4\
**Last updated:** [December 17, 2021, 12:04am UTC](https://discourse.julialang.org/t/summation-for-an-estimate-of-pi/73232 "2021-12-17T00:04:14Z")

</div>

hi there, i’m trying to do exercise 7.4 of the ThinkJulia book: The mathematician Srinivasa Ramanujan found an infinite series that can be used to generate a numerical approximation of 1/pi. I wrote the following code,…

---

## [CI tests in Ubuntu 20.04 started to fail recently](https://discourse.julialang.org/t/ci-tests-in-ubuntu-20-04-started-to-fail-recently/73233)

<div class="topic-metadata">

**Author:** [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Replies:** 0\
**Last updated:** [December 16, 2021, 11:34pm UTC](https://discourse.julialang.org/t/ci-tests-in-ubuntu-20-04-started-to-fail-recently/73233 "2021-12-16T23:34:46Z")

</div>

Hi, since two days the GMT.jl CI tests start to fail (well, they don’t even start) with an cryptic error message saying: ERROR: LoadError: LoadError: could not load library "/home/runner/gmt-install-dir/lib/libgmt.so" /…

---

## [Log determinant objective](https://discourse.julialang.org/t/log-determinant-objective/23927)

<div class="topic-metadata">

**Author:** [@Ksun46](https://discourse.julialang.org/u/Ksun46)\
**Replies:** 6\
**Last updated:** [December 16, 2021, 10:31pm UTC](https://discourse.julialang.org/t/log-determinant-objective/23927 "2021-12-16T22:31:38Z")

</div>

Any recommendations on how to formulate a log determinant objective in JuMP? Thanks.

---

## [Automatic/Black-box variational inference replication vs Autograd](https://discourse.julialang.org/t/automatic-black-box-variational-inference-replication-vs-autograd/73020)

<div class="topic-metadata">

**Author:** [@lf28](https://discourse.julialang.org/u/lf28)\
**Replies:** 9\
**Last updated:** [December 16, 2021, 10:25pm UTC](https://discourse.julialang.org/t/automatic-black-box-variational-inference-replication-vs-autograd/73020 "2021-12-16T22:25:26Z")

</div>

Hello all, I have been trying to replicate a simple example (Fig 2) presented in the paper: Black-box stochastic variational inference in five lines of Python (https://www.cs.toronto.edu/~duvenaud/papers/blackbox.pdf). …

---

## [How to store matrices as an element in a vector array?](https://discourse.julialang.org/t/how-to-store-matrices-as-an-element-in-a-vector-array/73230)

<div class="topic-metadata">

**Author:** [@leon](https://discourse.julialang.org/u/leon)\
**Replies:** 2\
**Last updated:** [December 16, 2021, 9:21pm UTC](https://discourse.julialang.org/t/how-to-store-matrices-as-an-element-in-a-vector-array/73230 "2021-12-16T21:21:47Z")

</div>

I have 16 matrices with the size of 360x180. My goal is to store them in a cell array like in Matlab, i.e., A = \[\]; for i=1:16 A{i} = Matrix i; end I thought I could do the same thing in Julia as below: A = \[\]; for i …

---

## [Infinity symbol](https://discourse.julialang.org/t/infinity-symbol/73204)

<div class="topic-metadata">

**Author:** [@ko56](https://discourse.julialang.org/u/ko56)\
**Replies:** 11\
**Last updated:** [December 16, 2021, 8:43pm UTC](https://discourse.julialang.org/t/infinity-symbol/73204 "2021-12-16T20:43:06Z")

</div>

Is there any reason that Julia does not allow Inf to be typed in as \\infty?

---

## [How can I control the threads in lower level in multithreading function?](https://discourse.julialang.org/t/how-can-i-control-the-threads-in-lower-level-in-multithreading-function/73227)

<div class="topic-metadata">

**Author:** [@Nova](https://discourse.julialang.org/u/Nova)\
**Replies:** 2\
**Last updated:** [December 16, 2021, 8:23pm UTC](https://discourse.julialang.org/t/how-can-i-control-the-threads-in-lower-level-in-multithreading-function/73227 "2021-12-16T20:23:21Z")

</div>

I applied multithreading on a for loop that results in runtime speedup. I have 12 cores on my system and by adjusting the number of threads (e.g. 4, 8, and 12), I observe an improvement in runtime. However, the runtime i…

---

## [Different results when registering the log-likelihood function vs pasting its contents](https://discourse.julialang.org/t/different-results-when-registering-the-log-likelihood-function-vs-pasting-its-contents/73214)

<div class="topic-metadata">

**Author:** [@ForceBru](https://discourse.julialang.org/u/ForceBru)\
**Replies:** 3\
**Last updated:** [December 16, 2021, 7:27pm UTC](https://discourse.julialang.org/t/different-results-when-registering-the-log-likelihood-function-vs-pasting-its-contents/73214 "2021-12-16T19:27:37Z")

</div>

I’m trying to optimize this log-likelihood function: -log(σ^2) / 2 - ϵ^2 / 2 + log( 2Φ(a \* ϵ) ) Here ϵ depends on data and some more parameters. I’m trying to optimize this in two ways: Put the sum of these likelih…

---

## [Future of COIN-OR (Cbc, Clp, Ipopt)](https://discourse.julialang.org/t/future-of-coin-or-cbc-clp-ipopt/73223)

<div class="topic-metadata">

**Author:** [@odow](https://discourse.julialang.org/u/odow)\
**Replies:** 0\
**Last updated:** [December 16, 2021, 7:07pm UTC](https://discourse.julialang.org/t/future-of-coin-or-cbc-clp-ipopt/73223 "2021-12-16T19:07:59Z")

</div>

Dear all, If you use any of the COIN-OR solvers (Cbc, Clp, Ipopt, Bonmin, or Couenne), please take a moment to read: Oscar

---

## [Serialized and deserialized JuMP CPLEX models are not the same](https://discourse.julialang.org/t/serialized-and-deserialized-jump-cplex-models-are-not-the-same/73194)

<div class="topic-metadata">

**Author:** [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Replies:** 1\
**Last updated:** [December 16, 2021, 5:36pm UTC](https://discourse.julialang.org/t/serialized-and-deserialized-jump-cplex-models-are-not-the-same/73194 "2021-12-16T17:36:57Z")

</div>

I want to run some long simulations with JuMP. After the simulations ends, I will start with the metaanalysis. So what I wanted to do is store the solved model in the filesystem and analyze it afterwards. During my pre-…

---

## [Zygote.jl-compatible dictionary-like mutable data types](https://discourse.julialang.org/t/zygote-jl-compatible-dictionary-like-mutable-data-types/73186)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 1\
**Last updated:** [December 16, 2021, 4:11pm UTC](https://discourse.julialang.org/t/zygote-jl-compatible-dictionary-like-mutable-data-types/73186 "2021-12-16T16:11:55Z")

</div>

Hi, to stack data without specified length, I utilised dictionary for my tasks. However, I found that there are some issues using dictionary with Zygote for automatic differentiation (AD), e.g., like this. Is there an…

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

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