# Latest

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

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

**Page:** 1351

---

## [Is there a function behaving the same as next\_permutation does in C++?](https://discourse.julialang.org/t/is-there-a-function-behaving-the-same-as-next-permutation-does-in-c/63451)

<div class="topic-metadata">

**Author:** [@AquaIndigo](https://discourse.julialang.org/u/AquaIndigo)\
**Replies:** 13\
**Last updated:** [June 24, 2021, 2:48pm UTC](https://discourse.julialang.org/t/is-there-a-function-behaving-the-same-as-next-permutation-does-in-c/63451 "2021-06-24T14:48:08Z")

</div>

I’m writing algorithms to solve a problem on LeetCode, and I need to find the next permutation of a vector. I wonder there is any function can help me. Many thanks.

---

## [Diagnosing "Fixed-effects matrix is rank-deficient"](https://discourse.julialang.org/t/diagnosing-fixed-effects-matrix-is-rank-deficient/63471)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 2\
**Last updated:** [June 24, 2021, 2:32pm UTC](https://discourse.julialang.org/t/diagnosing-fixed-effects-matrix-is-rank-deficient/63471 "2021-06-24T14:32:57Z")

</div>

I am using MixedModels fit(@formula(y ~ a + b + c + d + e), data) and it says “Warning: Fixed-effects matrix is rank-deficient”. I want to diagnose the problem. Can I find out which combinations of columns are not full r…

---

## [Sum the columns in a dataframe](https://discourse.julialang.org/t/sum-the-columns-in-a-dataframe/45077)

<div class="topic-metadata">

**Author:** [@fnbillimoria](https://discourse.julialang.org/u/fnbillimoria)\
**Replies:** 6\
**Last updated:** [June 24, 2021, 2:32pm UTC](https://discourse.julialang.org/t/sum-the-columns-in-a-dataframe/45077 "2021-06-24T14:32:36Z")

</div>

This should be a relatively simple question but I could not find a great answer. I have a dataframe like below ( but with way more colums), and I wish to add a new column that is the sum of all the other columns (e.g. a…

---

## [Better way of replacing Matrix values with another Array values](https://discourse.julialang.org/t/better-way-of-replacing-matrix-values-with-another-array-values/63440)

<div class="topic-metadata">

**Author:** [@eduardovrs](https://discourse.julialang.org/u/eduardovrs)\
**Replies:** 6\
**Last updated:** [June 24, 2021, 11:26am UTC](https://discourse.julialang.org/t/better-way-of-replacing-matrix-values-with-another-array-values/63440 "2021-06-24T11:26:45Z")

</div>

Dear Julia community, I want to change some values of an existing Matrix with some values that are on another array, but I find that this part of my code is the bottleneck of what I am doing. Is there a better way to do…

---

## [Finding roots of multivariate function with given bounds?](https://discourse.julialang.org/t/finding-roots-of-multivariate-function-with-given-bounds/63406)

<div class="topic-metadata">

**Author:** [@liuyxpp](https://discourse.julialang.org/u/liuyxpp)\
**Replies:** 14\
**Last updated:** [June 24, 2021, 10:59am UTC](https://discourse.julialang.org/t/finding-roots-of-multivariate-function-with-given-bounds/63406 "2021-06-24T10:59:28Z")

</div>

Suppose I have a multivariate function, f(x, y), with x \\in (0, 1) and y \\in (0, 1). I want to find the roots of following equation f(x, y) - c = 0 where c = \[c\_1\\ c\_2\]^T is a constant vector. In my case, there are l…

---

## [Weird case of the where's](https://discourse.julialang.org/t/weird-case-of-the-wheres/63491)

<div class="topic-metadata">

**Author:** [@rakeshvar](https://discourse.julialang.org/u/rakeshvar)\
**Replies:** 2\
**Last updated:** [June 24, 2021, 10:22am UTC](https://discourse.julialang.org/t/weird-case-of-the-wheres/63491 "2021-06-24T10:22:03Z")

</div>

julia\> function f(::f) where f f end f (generic function with 0 methods) julia\> function g(::f) where f f end g (generic function with 1 method) Why does the first definition fail to work wh…

---

## [MethodError: no method matching +(::Nothing, ::Array{Float64,1}) in parallel computation](https://discourse.julialang.org/t/methoderror-no-method-matching-nothing-array-float64-1-in-parallel-computation/63492)

<div class="topic-metadata">

**Author:** [@marouane](https://discourse.julialang.org/u/marouane)\
**Replies:** 0\
**Last updated:** [June 24, 2021, 10:16am UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-nothing-array-float64-1-in-parallel-computation/63492 "2021-06-24T10:16:56Z")

</div>

I want to run a code using parallel computing, which it works fine for serial computing @everywhere function relay\_basis(alpha,delta,name::String,n) #n is the number of sources for 1 relay we have 2 sources c…

---

## [What's the best idiom here?](https://discourse.julialang.org/t/whats-the-best-idiom-here/63483)

<div class="topic-metadata">

**Author:** [@harris-chris](https://discourse.julialang.org/u/harris-chris)\
**Replies:** 6\
**Last updated:** [June 24, 2021, 8:52am UTC](https://discourse.julialang.org/t/whats-the-best-idiom-here/63483 "2021-06-24T08:52:18Z")

</div>

Hello all I have a project in which I am using variables to represent sets of local state. For example: path::String end locf = LocalFile("/tmp/myfile") I then want to give the user the opportunity to delete these…

---

## [Slow Julia startup time after sysimage creation (and an unbelievable observation!)](https://discourse.julialang.org/t/slow-julia-startup-time-after-sysimage-creation-and-an-unbelievable-observation/44102)

<div class="topic-metadata">

**Author:** [@Marcell\_Havlik](https://discourse.julialang.org/u/Marcell_Havlik)\
**Replies:** 26\
**Last updated:** [June 24, 2021, 7:53am UTC](https://discourse.julialang.org/t/slow-julia-startup-time-after-sysimage-creation-and-an-unbelievable-observation/44102 "2021-06-24T07:53:19Z")

</div>

Hey Julianers, I found this: ➜ julia-awesomeness git:(master) ✗ time julia -e "" julia -e "" 0,10s user 0,09s system 181% cpu 0,110 total I built a sysimage and got these numbers: ➜ julia-awesomeness git:…

---

## [GC hitting hard](https://discourse.julialang.org/t/gc-hitting-hard/63102)

<div class="topic-metadata">

**Author:** [@Fabrice\_Rosay](https://discourse.julialang.org/u/Fabrice_Rosay)\
**Replies:** 9\
**Last updated:** [June 24, 2021, 7:35am UTC](https://discourse.julialang.org/t/gc-hitting-hard/63102 "2021-06-24T07:35:29Z")

</div>

Hi, I have a complicated function that if i call it twice in row with the exact same arguments, the second call is 50% slower. The function calls many kernels that execute on the gpu. I noticed that one of the sub-func…

---

## [An escape act in a macro](https://discourse.julialang.org/t/an-escape-act-in-a-macro/63477)

<div class="topic-metadata">

**Author:** [@eliassno](https://discourse.julialang.org/u/eliassno)\
**Replies:** 3\
**Last updated:** [June 24, 2021, 7:34am UTC](https://discourse.julialang.org/t/an-escape-act-in-a-macro/63477 "2021-06-24T07:34:32Z")

</div>

Warning: Yet another post on hygienic macros. I want to annotate the offsets of all interpolated values in a text string (storing the indices of the slices). I found it convenient to do this with a macro, but still str…

---

## [Multivariate empirical characteristic function](https://discourse.julialang.org/t/multivariate-empirical-characteristic-function/63311)

<div class="topic-metadata">

**Author:** [@Neurosurg](https://discourse.julialang.org/u/Neurosurg)\
**Replies:** 1\
**Last updated:** [June 21, 2021, 7:29pm UTC](https://discourse.julialang.org/t/multivariate-empirical-characteristic-function/63311 "2021-06-21T19:29:50Z")

</div>

Hi, I am a Pythonista, yet totally new to Julia though. Could someone, please, demonstrate an example on how to code an empirical characteristic function (ideally multivariate) in Julia-way? That is, let’s say, we’ve …

---

## [Deterministic tie breaking with a hash function, with desired statistical property](https://discourse.julialang.org/t/deterministic-tie-breaking-with-a-hash-function-with-desired-statistical-property/63472)

<div class="topic-metadata">

**Author:** [@goretkin](https://discourse.julialang.org/u/goretkin)\
**Replies:** 2\
**Last updated:** [June 24, 2021, 6:11am UTC](https://discourse.julialang.org/t/deterministic-tie-breaking-with-a-hash-function-with-desired-statistical-property/63472 "2021-06-24T06:11:08Z")

</div>

Background: I am using a priority queue to search paths on an integer lattice. In general, there is not a unique minimum element in the priority queue, so I augment the priorities with a value that is designed to break …

---

## [Getting warning Cannot declare constant; it already has a value](https://discourse.julialang.org/t/getting-warning-cannot-declare-constant-it-already-has-a-value/63480)

<div class="topic-metadata">

**Author:** [@james-garfield](https://discourse.julialang.org/u/james-garfield)\
**Replies:** 1\
**Last updated:** [June 24, 2021, 5:16am UTC](https://discourse.julialang.org/t/getting-warning-cannot-declare-constant-it-already-has-a-value/63480 "2021-06-24T05:16:02Z")

</div>

I have a mutable struct that is giving me a warning Cannot declare constant; it already has a value. I do not declare const for any values in my struct constructor. I’m still quite new to Julia so I’m not too understand…

---

## [OpenStreetMaps in Pluto](https://discourse.julialang.org/t/openstreetmaps-in-pluto/63476)

<div class="topic-metadata">

**Author:** [@Rajith\_Vidanaarachch](https://discourse.julialang.org/u/Rajith_Vidanaarachch)\
**Replies:** 1\
**Last updated:** [June 24, 2021, 5:14am UTC](https://discourse.julialang.org/t/openstreetmaps-in-pluto/63476 "2021-06-24T05:14:12Z")

</div>

Is it possible to use OpenStreetMaps in Pluto yet? (through OpenStreetMapsX.jl package?) Thanks!

---

## [Garbage collector behaviour when memory is almost full](https://discourse.julialang.org/t/garbage-collector-behaviour-when-memory-is-almost-full/28169)

<div class="topic-metadata">

**Author:** [@rssdev10](https://discourse.julialang.org/u/rssdev10)\
**Replies:** 7\
**Last updated:** [June 24, 2021, 4:59am UTC](https://discourse.julialang.org/t/garbage-collector-behaviour-when-memory-is-almost-full/28169 "2021-06-24T04:59:15Z")

</div>

I have a script for calculation of millions of strings distances with StringDistances.jl. I’m using 64 CPUs virtual machine with 240GB RAM and found that my script was killed by out of memory. I cleared the script to min…

---

## [Threads over iterator products](https://discourse.julialang.org/t/threads-over-iterator-products/63407)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 10\
**Last updated:** [June 24, 2021, 4:48am UTC](https://discourse.julialang.org/t/threads-over-iterator-products/63407 "2021-06-24T04:48:19Z")

</div>

It there a way to use @threads over iterator products? I am trying to convert some nested loops like: julia\> r = zeros(Threads.nthreads()) Threads.@threads for i in 0:1 for j in 0:1 r\[Threads.…

---

## [On run(\`export\`) vs ;export](https://discourse.julialang.org/t/on-run-export-vs-export/63479)

<div class="topic-metadata">

**Author:** [@alasaadstat](https://discourse.julialang.org/u/alasaadstat)\
**Replies:** 1\
**Last updated:** [June 24, 2021, 3:06am UTC](https://discourse.julialang.org/t/on-run-export-vs-export/63479 "2021-06-24T03:06:58Z")

</div>

I would like to run the command export in shell mode, and it works in the REPL if I run ;export, but I need to have this inside my code so after doing research I thought it would be run(export), export inside backtick, b…

---

## [Size Mismatch Convolution Layer](https://discourse.julialang.org/t/size-mismatch-convolution-layer/63190)

<div class="topic-metadata">

**Author:** [@BroccoliFever](https://discourse.julialang.org/u/BroccoliFever)\
**Replies:** 3\
**Last updated:** [June 24, 2021, 1:02am UTC](https://discourse.julialang.org/t/size-mismatch-convolution-layer/63190 "2021-06-24T01:02:40Z")

</div>

I have some experience using PyTorch, so I decided to try to learn another language for Deep Learning and happened upon Julia and Flux.jl. I am trying to get started with a simple cat/dog classification problem, and I ha…

---

## [Transforming a DataFrame column by mapping with a Dict](https://discourse.julialang.org/t/transforming-a-dataframe-column-by-mapping-with-a-dict/61753)

<div class="topic-metadata">

**Author:** [@anon71627001](https://discourse.julialang.org/u/anon71627001)\
**Replies:** 5\
**Last updated:** [June 23, 2021, 11:15pm UTC](https://discourse.julialang.org/t/transforming-a-dataframe-column-by-mapping-with-a-dict/61753 "2021-06-23T23:15:08Z")

</div>

Let’s say I have a DataFrame and a Dict: df = DataFrame( a = 1:3, b = \["beetle", "fly", "spider"\]) arthropod\_dict = Dict( "beetle" =\> "insect", "fly" =\> "insect", "spider" =\> "arachnid") And I’d li…

---

## [Understanding how one task can block another task](https://discourse.julialang.org/t/understanding-how-one-task-can-block-another-task/63413)

<div class="topic-metadata">

**Author:** [@colintbowers](https://discourse.julialang.org/u/colintbowers)\
**Replies:** 9\
**Last updated:** [June 23, 2021, 11:17pm UTC](https://discourse.julialang.org/t/understanding-how-one-task-can-block-another-task/63413 "2021-06-23T23:17:23Z")

</div>

I’m utterly inexperienced in the usage of tasks in any programming language. I’m having trouble in my present application and came up with the following example to try and explain to myself what is going wrong. What I’m …

---

## [How to make Pkg use specific SSL certificate for verifying servers? (General registry adding issue on work network | Windows)](https://discourse.julialang.org/t/how-to-make-pkg-use-specific-ssl-certificate-for-verifying-servers-general-registry-adding-issue-on-work-network-windows/63023)

<div class="topic-metadata">

**Author:** [@scimas](https://discourse.julialang.org/u/scimas)\
**Replies:** 19\
**Last updated:** [June 23, 2021, 9:44pm UTC](https://discourse.julialang.org/t/how-to-make-pkg-use-specific-ssl-certificate-for-verifying-servers-general-registry-adding-issue-on-work-network-windows/63023 "2021-06-23T21:44:58Z")

</div>

I have cleaned up the .julia/registries directory. I’m accessing julia from powershell and/or bash (that comes with git for windows). I’ve read some similar threads on discourse, but they didn’t help to solve the probl…

---

## [Gurobi license issue](https://discourse.julialang.org/t/gurobi-license-issue/36547)

<div class="topic-metadata">

**Author:** [@Nicolas\_Slosse](https://discourse.julialang.org/u/Nicolas_Slosse)\
**Replies:** 13\
**Last updated:** [June 23, 2021, 9:04pm UTC](https://discourse.julialang.org/t/gurobi-license-issue/36547 "2021-06-23T21:04:38Z")

</div>

Dear forum, I have installed a fresh version of Gurobi.jl and JuMP for Julia Version 1.3.1 on a linux server. When making call to Gurobi 9.0 from Julia, I bump on the following error message : ERROR: LoadError: Invali…

---

## [Dynamically generate DataFrame in function with number of columns determined by length of array arguments](https://discourse.julialang.org/t/dynamically-generate-dataframe-in-function-with-number-of-columns-determined-by-length-of-array-arguments/63446)

<div class="topic-metadata">

**Author:** [@dfa\_julia\_quant](https://discourse.julialang.org/u/dfa_julia_quant)\
**Replies:** 12\
**Last updated:** [June 23, 2021, 8:53pm UTC](https://discourse.julialang.org/t/dynamically-generate-dataframe-in-function-with-number-of-columns-determined-by-length-of-array-arguments/63446 "2021-06-23T20:53:17Z")

</div>

""" I am trying to generate a function that creates a DataFrame dynamically with number of columns determined by length of array arguments (n) to the function. But I failed to generate the DataFrame dynamically because …

---

## [Flux.jl Inconsistent Training on Custom Architecture](https://discourse.julialang.org/t/flux-jl-inconsistent-training-on-custom-architecture/63326)

<div class="topic-metadata">

**Author:** [@than123](https://discourse.julialang.org/u/than123)\
**Replies:** 9\
**Last updated:** [June 23, 2021, 8:52pm UTC](https://discourse.julialang.org/t/flux-jl-inconsistent-training-on-custom-architecture/63326 "2021-06-23T20:52:12Z")

</div>

I am currently implementing a toy version of the architecture as found in: Deep learning for universal linear embeddings of nonlinear dynamics | Nature Communications , which is effectively an encoder → affine → decoder…

---

## [Create an empty array, then insert (Priority Queue)](https://discourse.julialang.org/t/create-an-empty-array-then-insert-priority-queue/63425)

<div class="topic-metadata">

**Author:** [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Replies:** 6\
**Last updated:** [June 23, 2021, 8:13pm UTC](https://discourse.julialang.org/t/create-an-empty-array-then-insert-priority-queue/63425 "2021-06-23T20:13:42Z")

</div>

Hi, I want to convert a small Matlab code for a sorted list with key - value pairs (array implementation of a priority queue) to Julia. Double keys are allowed, but sorted according to addition for causality. Values ca…

---

## [Running .jl file from PowerShell](https://discourse.julialang.org/t/running-jl-file-from-powershell/63462)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 5\
**Last updated:** [June 23, 2021, 8:02pm UTC](https://discourse.julialang.org/t/running-jl-file-from-powershell/63462 "2021-06-23T20:02:17Z")

</div>

Hello, I am having the below error when I am trying to open .jl file from the PowerShell" Any recommendation to solve it? Thanks!

---

## [IFFT function in julia](https://discourse.julialang.org/t/ifft-function-in-julia/63454)

<div class="topic-metadata">

**Author:** [@juls](https://discourse.julialang.org/u/juls)\
**Replies:** 7\
**Last updated:** [June 23, 2021, 7:56pm UTC](https://discourse.julialang.org/t/ifft-function-in-julia/63454 "2021-06-23T19:56:33Z")

</div>

I am trying to implement the below matrix computation from matlab in julia. But the ifft function gives different output than obtained in matlab a = zeros(5,10); for i = 1:5 a(i,:) = ifft((c(i,:).\*(d))); end w…

---

## [Setting Number of Threads in VScode](https://discourse.julialang.org/t/setting-number-of-threads-in-vscode/63460)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 4\
**Last updated:** [June 23, 2021, 7:46pm UTC](https://discourse.julialang.org/t/setting-number-of-threads-in-vscode/63460 "2021-06-23T19:46:45Z")

</div>

Hello, I’ve set the number of threads to be 12 in Julia extension in VScode. However, when I check it in Julia REPL it shows 1. Any recommendation to solve it? Thanks!

---

## [Setting Number of Threads at startup for VS Code](https://discourse.julialang.org/t/setting-number-of-threads-at-startup-for-vs-code/63445)

<div class="topic-metadata">

**Author:** [@Amro](https://discourse.julialang.org/u/Amro)\
**Replies:** 12\
**Last updated:** [June 23, 2021, 5:08pm UTC](https://discourse.julialang.org/t/setting-number-of-threads-at-startup-for-vs-code/63445 "2021-06-23T17:08:13Z")

</div>

Hello, I am trying to set the number of threads (such as 4) in Julia by using the command: JULIA\_NUM\_THREADS=4 in CMD in window before launching Julia, which works. However, I need to set this issue inside “.jl” file…

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

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