# Latest

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

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

**Page:** 1447

---

## [Rewriting dplyr code which uses a function of columns in Julia -style using DataFrames.jl](https://discourse.julialang.org/t/rewriting-dplyr-code-which-uses-a-function-of-columns-in-julia-style-using-dataframes-jl/57939)

<div class="topic-metadata">

**Author:** [@Adam\_Fleischhacker](https://discourse.julialang.org/u/Adam_Fleischhacker)\
**Replies:** 5\
**Last updated:** [March 25, 2021, 5:49pm UTC](https://discourse.julialang.org/t/rewriting-dplyr-code-which-uses-a-function-of-columns-in-julia-style-using-dataframes-jl/57939 "2021-03-25T17:49:14Z")

</div>

I am migrating my brain towards thinking in Julia-esque style. Yet, I am not sure how to approach this problem where I want to create a third column of a data frame that is a function of the other two. I prefer intuiti…

---

## [Mean of Period](https://discourse.julialang.org/t/mean-of-period/57951)

<div class="topic-metadata">

**Author:** [@Paul\_McVay](https://discourse.julialang.org/u/Paul_McVay)\
**Replies:** 2\
**Last updated:** [March 25, 2021, 5:05pm UTC](https://discourse.julialang.org/t/mean-of-period/57951 "2021-03-25T17:05:56Z")

</div>

So reading the documentation, if you take a difference of DateTime you get an Period outputs (year, minute etc) and these are supposed to behave like integers. But if I would like the average period time (ex mean(\[Second…

---

## [Pre-allocating a DateTime vector](https://discourse.julialang.org/t/pre-allocating-a-datetime-vector/57949)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 1\
**Last updated:** [March 25, 2021, 4:32pm UTC](https://discourse.julialang.org/t/pre-allocating-a-datetime-vector/57949 "2021-03-25T16:32:36Z")

</div>

In a prior post, the following was suggested to preallocate a DateTime vector with 100 rows: sDate = Vector{DateTime}(100) Unfortunately, that doesn’t work on my system. What am I missing?

---

## [Interact vbox/hbox size](https://discourse.julialang.org/t/interact-vbox-hbox-size/57947)

<div class="topic-metadata">

**Author:** [@saraflgarcia](https://discourse.julialang.org/u/saraflgarcia)\
**Replies:** 0\
**Last updated:** [March 25, 2021, 4:24pm UTC](https://discourse.julialang.org/t/interact-vbox-hbox-size/57947 "2021-03-25T16:24:48Z")

</div>

Hello everyone, I am using Interact with Blink and Web IO. How can I define a vbox or hbox size and position within the window? Thanks in advance

---

## [Meshcat - change scene properties](https://discourse.julialang.org/t/meshcat-change-scene-properties/57885)

<div class="topic-metadata">

**Author:** [@saraflgarcia](https://discourse.julialang.org/u/saraflgarcia)\
**Replies:** 2\
**Last updated:** [March 25, 2021, 4:21pm UTC](https://discourse.julialang.org/t/meshcat-change-scene-properties/57885 "2021-03-25T16:21:23Z")

</div>

Hi everyone, I’m using Meshcat with Blink and WebIO. How can I change its default properties concerning: Background color, Grid on/off, Visualizer size & position in Blink window Thanks in advance

---

## [Convert output of GR.tricont() (GR.SVG) to something Plots can interact with](https://discourse.julialang.org/t/convert-output-of-gr-tricont-gr-svg-to-something-plots-can-interact-with/57943)

<div class="topic-metadata">

**Author:** [@jacobusmmsmit](https://discourse.julialang.org/u/jacobusmmsmit)\
**Replies:** 0\
**Last updated:** [March 25, 2021, 4:13pm UTC](https://discourse.julialang.org/t/convert-output-of-gr-tricont-gr-svg-to-something-plots-can-interact-with/57943 "2021-03-25T16:13:55Z")

</div>

Hello all, I’m trying to use GR’s tricont function as I can’t find out how to do this using Plots alone, and then put the output of this onto an existing plot generated by Plots. However, I cannot figure out how to turn…

---

## [Weights are not updated](https://discourse.julialang.org/t/weights-are-not-updated/57730)

<div class="topic-metadata">

**Author:** [@Sunny](https://discourse.julialang.org/u/Sunny)\
**Replies:** 8\
**Last updated:** [March 25, 2021, 3:50pm UTC](https://discourse.julialang.org/t/weights-are-not-updated/57730 "2021-03-25T15:50:30Z")

</div>

I can’t update weights Here is an example struct hess\_nn net re p # Define inner constructor method function hess\_nn(net; p = nothing) \_p, re = Flux.destructure(net) if p === nothin…

---

## [\[ANN\] SphereSurfaceHistogram.jl](https://discourse.julialang.org/t/ann-spheresurfacehistogram-jl/57940)

<div class="topic-metadata">

**Author:** [@ffreyer](https://discourse.julialang.org/u/ffreyer)\
**Replies:** 0\
**Last updated:** [March 25, 2021, 3:38pm UTC](https://discourse.julialang.org/t/ann-spheresurfacehistogram-jl/57940 "2021-03-25T15:38:52Z")

</div>

SphereSurfaceHistogram is a relatively small package that allows you to create a histogram of 3D unit vectors. To use the package you need to first create an SSHBinner with some number of bins. The number of bins will t…

---

## [Julia Complex Exponential Evaluation vs Matlab](https://discourse.julialang.org/t/julia-complex-exponential-evaluation-vs-matlab/57759)

<div class="topic-metadata">

**Author:** [@Pulpo](https://discourse.julialang.org/u/Pulpo)\
**Replies:** 11\
**Last updated:** [March 25, 2021, 3:37pm UTC](https://discourse.julialang.org/t/julia-complex-exponential-evaluation-vs-matlab/57759 "2021-03-25T15:37:54Z")

</div>

I have a vector that is 2048 that I have coded up in Julia and Matlab. The values of the vector in both Matlab is given by the following function: nn=2048 ; h= 2 \* pi/nn; vec=\[cos(-pi/2),sin(-pi/2)\]; g = x-\>exp(im \*…

---

## [Broadcasting to all fields of a struct](https://discourse.julialang.org/t/broadcasting-to-all-fields-of-a-struct/57924)

<div class="topic-metadata">

**Author:** [@Philippe\_Maincon1](https://discourse.julialang.org/u/Philippe_Maincon1)\
**Replies:** 13\
**Last updated:** [March 25, 2021, 2:48pm UTC](https://discourse.julialang.org/t/broadcasting-to-all-fields-of-a-struct/57924 "2021-03-25T14:48:43Z")

</div>

I have a data structure, nesting AbstractArrays and Structs, where all the elements (leaves of my datatree) are, for example Float64, and I wish to transform them all into Float32, by rebuilding the data structure. I wr…

---

## [Removing the header of a dataframe](https://discourse.julialang.org/t/removing-the-header-of-a-dataframe/57921)

<div class="topic-metadata">

**Author:** [@yogi1](https://discourse.julialang.org/u/yogi1)\
**Replies:** 2\
**Last updated:** [March 25, 2021, 2:47pm UTC](https://discourse.julialang.org/t/removing-the-header-of-a-dataframe/57921 "2021-03-25T14:47:23Z")

</div>

Hi all, I have read in a csv using “csv.read()” and then using the link below I have transposed the data. Transpose of Julia DataFrame - Stack Overflow This is great and transposes the data as expected, however Julia …

---

## [Symbolics and substitution?](https://discourse.julialang.org/t/symbolics-and-substitution/57460)

<div class="topic-metadata">

**Author:** [@BLI](https://discourse.julialang.org/u/BLI)\
**Replies:** 20\
**Last updated:** [March 25, 2021, 2:35pm UTC](https://discourse.julialang.org/t/symbolics-and-substitution/57460 "2021-03-25T14:35:08Z")

</div>

I’m trying to use Symbolics.jl to fit a polynomial to some data points (\\ldots,(x\_j,y\_j),\\ldots) by Lagrange interpolation, then take the derivative of the polynomial, and substitute some relationships between the data p…

---

## [Google Summer of Code 2021 AMA with the Julia Language | Come ask questions!](https://discourse.julialang.org/t/google-summer-of-code-2021-ama-with-the-julia-language-come-ask-questions/57933)

<div class="topic-metadata">

**Author:** [@logankilpatrick](https://discourse.julialang.org/u/logankilpatrick)\
**Replies:** 0\
**Last updated:** [March 25, 2021, 1:53pm UTC](https://discourse.julialang.org/t/google-summer-of-code-2021-ama-with-the-julia-language-come-ask-questions/57933 "2021-03-25T13:53:46Z")

</div>

Hey folks, as you may or may not know, the Google Summer of Code student application window is fast approaching. We are going to be hosting a AMA style session this Saturday at 3 PM UTC with some former GSoC/JSoC student…

---

## [Computing ~Z-transform~ residues in Julia](https://discourse.julialang.org/t/computing-z-transform-residues-in-julia/57446)

<div class="topic-metadata">

**Author:** [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Replies:** 8\
**Last updated:** [March 25, 2021, 2:17pm UTC](https://discourse.julialang.org/t/computing-z-transform-residues-in-julia/57446 "2021-03-25T14:17:29Z")

</div>

Hey Are there any libraries that compute the Z transform and it’s inverse, implemented in julia? I know of ControlSystems.jl for continous systems - can it’s features be applied to discrete systems as well? Is there any…

---

## [Opposite of unique](https://discourse.julialang.org/t/opposite-of-unique/57802)

<div class="topic-metadata">

**Author:** [@Ribeiro](https://discourse.julialang.org/u/Ribeiro)\
**Replies:** 19\
**Last updated:** [March 25, 2021, 12:37pm UTC](https://discourse.julialang.org/t/opposite-of-unique/57802 "2021-03-25T12:37:22Z")

</div>

Hi! Is there a function that does the opposite of unique? Say nonunique(\[1,2,3,4,3,5,3,2\]) = \[2,3\] Thanks a lot!

---

## [How can I run only a newly add line of code?](https://discourse.julialang.org/t/how-can-i-run-only-a-newly-add-line-of-code/57918)

<div class="topic-metadata">

**Author:** [@Zerosum](https://discourse.julialang.org/u/Zerosum)\
**Replies:** 3\
**Last updated:** [March 25, 2021, 11:01am UTC](https://discourse.julialang.org/t/how-can-i-run-only-a-newly-add-line-of-code/57918 "2021-03-25T11:01:11Z")

</div>

Hi, I am not sure about the keywords that I should look for on this problem. Suppose my codes can be separated into two parts. The first part is generating a very huge Markov transition matrix and finding a solution o…

---

## [The Turing Challenge - a reward for using Julia](https://discourse.julialang.org/t/the-turing-challenge-a-reward-for-using-julia/57912)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 2\
**Last updated:** [March 25, 2021, 7:52am UTC](https://discourse.julialang.org/t/the-turing-challenge-a-reward-for-using-julia/57912 "2021-03-25T07:52:43Z")

</div>

The UK has released a new banknote which features Alan Turing. People on this forum might be interested in the puzzle challenge with GCHQ (UK agency which is the successor to Bletchley Park) have releases on their websi…

---

## [Nsight compute from CUDA.jl and source annotation](https://discourse.julialang.org/t/nsight-compute-from-cuda-jl-and-source-annotation/57855)

<div class="topic-metadata">

**Author:** [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Replies:** 3\
**Last updated:** [March 25, 2021, 7:28am UTC](https://discourse.julialang.org/t/nsight-compute-from-cuda-jl-and-source-annotation/57855 "2021-03-25T07:28:48Z")

</div>

Hi, I try to build a training session on GPU programming (including kernel programming) and I want to use Julia and CUDA.jl as a development environment. Profiling is an essential tool for GPGPU and I think that profili…

---

## [Autograd through loss function with derivatives in](https://discourse.julialang.org/t/autograd-through-loss-function-with-derivatives-in/57864)

<div class="topic-metadata">

**Author:** [@RynoLaubscher](https://discourse.julialang.org/u/RynoLaubscher)\
**Replies:** 1\
**Last updated:** [March 25, 2021, 6:51am UTC](https://discourse.julialang.org/t/autograd-through-loss-function-with-derivatives-in/57864 "2021-03-25T06:51:46Z")

</div>

Hi All, I am relatively new to Julia, coming from a C/C++ & Python background. I am absolutely loving Julia, but I am struggling a bit to build a simple PINN model using Zygote/Flux (and I tried ForwardDiff). I am using …

---

## [Burn-in in Metropolis-Hastings](https://discourse.julialang.org/t/burn-in-in-metropolis-hastings/57769)

<div class="topic-metadata">

**Author:** [@marouane1994](https://discourse.julialang.org/u/marouane1994)\
**Replies:** 9\
**Last updated:** [March 25, 2021, 6:38am UTC](https://discourse.julialang.org/t/burn-in-in-metropolis-hastings/57769 "2021-03-25T06:38:33Z")

</div>

i have written a metropolis-hastings code for myself but it doesn’t quite give me the smoothest result that i want so i want to put the burn-in in it, maybe finding a good starting point will increase the efficiency, the…

---

## [How to understand Flux.functor?](https://discourse.julialang.org/t/how-to-understand-flux-functor/57906)

<div class="topic-metadata">

**Author:** [@pilgrimygy](https://discourse.julialang.org/u/pilgrimygy)\
**Replies:** 2\
**Last updated:** [March 25, 2021, 5:51am UTC](https://discourse.julialang.org/t/how-to-understand-flux-functor/57906 "2021-03-25T05:51:33Z")

</div>

Dear Community, I got a question about functor usage in Flux.jl. When I read the DQN code in ReinforcementLearningZoo, I confused the usage of the functor: Flux.functor(x::DQNLearner) = (Q = x.approximator, Qₜ = x.targe…

---

## [\`$ julia -p n\` can't use Project.toml?](https://discourse.julialang.org/t/julia-p-n-cant-use-project-toml/57907)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 2\
**Last updated:** [March 25, 2021, 5:17am UTC](https://discourse.julialang.org/t/julia-p-n-cant-use-project-toml/57907 "2021-03-25T05:17:19Z")

</div>

Basic script: me@pc:/tmp/testenv$ less /tmp/testproj/test.jl using Optim,DataFrames DataFrame(rand(3,3)) Project has all deps: me@pc:/tmp/testenv$ less /tmp/testproj/Project.toml ./Project.toml me@pc:/tmp/testen…

---

## [Mutate Zygote Gradients with a Custom Mask Before Update?](https://discourse.julialang.org/t/mutate-zygote-gradients-with-a-custom-mask-before-update/57236)

<div class="topic-metadata">

**Author:** [@boltzmannbrain](https://discourse.julialang.org/u/boltzmannbrain)\
**Replies:** 1\
**Last updated:** [March 25, 2021, 5:07am UTC](https://discourse.julialang.org/t/mutate-zygote-gradients-with-a-custom-mask-before-update/57236 "2021-03-25T05:07:50Z")

</div>

I’m new to Flux/Zygote and I’m trying to train a model with dense layers such that the associated weight matrices are lower triangular. It seems like the way to do this is to write a custom train! function and zero the g…

---

## [Error using ControlSystems' lsim](https://discourse.julialang.org/t/error-using-controlsystems-lsim/57898)

<div class="topic-metadata">

**Author:** [@cjdakin](https://discourse.julialang.org/u/cjdakin)\
**Replies:** 1\
**Last updated:** [March 25, 2021, 4:59am UTC](https://discourse.julialang.org/t/error-using-controlsystems-lsim/57898 "2021-03-25T04:59:05Z")

</div>

Newbie to the ControlSystems toolbox trying to simulate the output of a control signal being passed through a transfer function but am having trouble solving an error that is arising. Is it due to a coding error or the t…

---

## [Sum or fold over fields in a struct](https://discourse.julialang.org/t/sum-or-fold-over-fields-in-a-struct/57901)

<div class="topic-metadata">

**Author:** [@Anticrisis](https://discourse.julialang.org/u/Anticrisis)\
**Replies:** 7\
**Last updated:** [March 25, 2021, 3:41am UTC](https://discourse.julialang.org/t/sum-or-fold-over-fields-in-a-struct/57901 "2021-03-25T03:41:18Z")

</div>

Given an array of RGB{UInt8} values, how can we collect the sums of their independent :r, :g, and :b 8-bit components, without overflowing? We can write a for loop and do this manually: for v in arr r += v.r g +=…

---

## [Static array over 1,024 elements is slow to compile?](https://discourse.julialang.org/t/static-array-over-1-024-elements-is-slow-to-compile/57764)

<div class="topic-metadata">

**Author:** [@jdh62043](https://discourse.julialang.org/u/jdh62043)\
**Replies:** 11\
**Last updated:** [March 25, 2021, 3:54am UTC](https://discourse.julialang.org/t/static-array-over-1-024-elements-is-slow-to-compile/57764 "2021-03-25T03:54:15Z")

</div>

I am trying to improve the compilation time of using the StaticArrays package in my use case. Currently, I have made a fork of the package and changed how broadcasting works to generate rolled-up loops instead of its pre…

---

## [\[RFC\] PipelessPipes.jl (now Chain.jl)](https://discourse.julialang.org/t/rfc-pipelesspipes-jl-now-chain-jl/50448)

<div class="topic-metadata">

**Author:** [@jules](https://discourse.julialang.org/u/jules)\
**Replies:** 61\
**Last updated:** [March 25, 2021, 3:26am UTC](https://discourse.julialang.org/t/rfc-pipelesspipes-jl-now-chain-jl/50448 "2021-03-25T03:26:25Z")

</div>

PipelessPipes.jl is not a package, yet, as I would be interested in hearing some opinions first. Here are my thoughts about Pipe.jl and Lazy.jl, which I have tried previously: Pipe.jl pros \_ syntax is nice and non-magi…

---

## [Pkg REPL mode bug in 1.6.0-rc2](https://discourse.julialang.org/t/pkg-repl-mode-bug-in-1-6-0-rc2/57261)

<div class="topic-metadata">

**Author:** [@braydenware](https://discourse.julialang.org/u/braydenware)\
**Replies:** 2\
**Last updated:** [March 25, 2021, 1:45am UTC](https://discourse.julialang.org/t/pkg-repl-mode-bug-in-1-6-0-rc2/57261 "2021-03-25T01:45:15Z")

</div>

There seems to be a bug in parsing the strings in Pkg. It only happens in a weird subset of cases: specifically, only on 1.6.0, only when using ssh rather than http to clone, and only when trying to add a specific packag…

---

## [How to use ArgParse with Distributed (error calling from inside main)?](https://discourse.julialang.org/t/how-to-use-argparse-with-distributed-error-calling-from-inside-main/57902)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 1\
**Last updated:** [March 25, 2021, 12:57am UTC](https://discourse.julialang.org/t/how-to-use-argparse-with-distributed-error-calling-from-inside-main/57902 "2021-03-25T00:57:15Z")

</div>

For some reason I can’t get a basic example of this working: File: testargs.jl # example 1: minimal options/arguments, auto-generated help/version using ArgParse function main(args) s = ArgParseSettings("Run deco…

---

## [\[ANN\] ProjectManagement.jl](https://discourse.julialang.org/t/ann-projectmanagement-jl/48693)

<div class="topic-metadata">

**Author:** [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Replies:** 2\
**Last updated:** [March 25, 2021, 12:51am UTC](https://discourse.julialang.org/t/ann-projectmanagement-jl/48693 "2021-03-25T00:51:53Z")

</div>

I am announcing the initial release of ProjectManagement.jl v1.0.0. It is for project management, in the sense of the processes created for the Polaris Missile Project in the late 50s. It is basically for working with …

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

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