# Latest

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

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

**Page:** 1535

---

## [Rounding DateTime](https://discourse.julialang.org/t/rounding-datetime/52603)

<div class="topic-metadata">

**Author:** [@chrisk477](https://discourse.julialang.org/u/chrisk477)\
**Replies:** 5\
**Last updated:** [December 30, 2020, 9:40am UTC](https://discourse.julialang.org/t/rounding-datetime/52603 "2020-12-30T09:40:22Z")

</div>

Hello, sorry for the basic question. I want to round the time values of a time series to various periods, let’s say a 10-second-period, so that for example 10:23:47 becomes 10:23:40 I wanted to do this with the follow…

---

## [How to reindex in DataFrames?](https://discourse.julialang.org/t/how-to-reindex-in-dataframes/51112)

<div class="topic-metadata">

**Author:** [@timueh](https://discourse.julialang.org/u/timueh)\
**Replies:** 9\
**Last updated:** [December 30, 2020, 7:29am UTC](https://discourse.julialang.org/t/how-to-reindex-in-dataframes/51112 "2020-12-30T07:29:36Z")

</div>

I am looking for a reindex function for DataFrames that allows to reindex a column with respect to a new column. Suppose I build a data frame like this julia\> ind = today():Day(2):today()+Day(10) Date("2020-12-02"):Day…

---

## [Filter array of CartesianIndex based on x-value](https://discourse.julialang.org/t/filter-array-of-cartesianindex-based-on-x-value/52583)

<div class="topic-metadata">

**Author:** [@zxjroger](https://discourse.julialang.org/u/zxjroger)\
**Replies:** 9\
**Last updated:** [December 30, 2020, 8:35am UTC](https://discourse.julialang.org/t/filter-array-of-cartesianindex-based-on-x-value/52583 "2020-12-30T08:35:35Z")

</div>

I have a vector of Cartesian indexes, for example: temp = \[CartesianIndex(3, 1), CartesianIndex(2, 2), CartesianIndex(6, 3), CartesianIndex(3, 4), CartesianIndex(1, 5), CartesianIndex(5, 6), CartesianIndex(1, 7…

---

## [Possible To Use iTerm Instead of Terminal on OS X to run Julia?](https://discourse.julialang.org/t/possible-to-use-iterm-instead-of-terminal-on-os-x-to-run-julia/52601)

<div class="topic-metadata">

**Author:** [@Scotsman](https://discourse.julialang.org/u/Scotsman)\
**Replies:** 2\
**Last updated:** [December 30, 2020, 7:24am UTC](https://discourse.julialang.org/t/possible-to-use-iterm-instead-of-terminal-on-os-x-to-run-julia/52601 "2020-12-30T07:24:18Z")

</div>

When I start Julia it comes up in Terminal on my iMac. Is there a way to change Julia to use iTerm instead? A beginner to Julia thanks you.

---

## [Flux, CUDA, Zygote : InvalidIRError: compiling kernel getindex\_kernel(CUDA.CuKernelContext, CuDeviceArray](https://discourse.julialang.org/t/flux-cuda-zygote-invalidirerror-compiling-kernel-getindex-kernel-cuda-cukernelcontext-cudevicearray/52557)

<div class="topic-metadata">

**Author:** [@kadir-gunel](https://discourse.julialang.org/u/kadir-gunel)\
**Replies:** 4\
**Last updated:** [December 30, 2020, 7:58am UTC](https://discourse.julialang.org/t/flux-cuda-zygote-invalidirerror-compiling-kernel-getindex-kernel-cuda-cukernelcontext-cudevicearray/52557 "2020-12-30T07:58:18Z")

</div>

I have a flux model composed of convolution and deconvolution layers with a custom loss function. I try to train the model but get ERROR: InvalidIRError: compiling kernel getindex\_kernel(CUDA.CuKernelContext, CuDeviceArr…

---

## [Val types vs singletons, is one easier for inference / compilation?](https://discourse.julialang.org/t/val-types-vs-singletons-is-one-easier-for-inference-compilation/52599)

<div class="topic-metadata">

**Author:** [@marius311](https://discourse.julialang.org/u/marius311)\
**Replies:** 3\
**Last updated:** [December 30, 2020, 5:52am UTC](https://discourse.julialang.org/t/val-types-vs-singletons-is-one-easier-for-inference-compilation/52599 "2020-12-30T05:52:40Z")

</div>

I’ve got some quantity which is inherently a singleton, and a function which returns it as part of a tuple. If I denote the singleton quantity by a type itself, I lose the type information (as expected): struct Singleto…

---

## [Vscode-julia doesn't find intel MKL shared objects](https://discourse.julialang.org/t/vscode-julia-doesnt-find-intel-mkl-shared-objects/52232)

<div class="topic-metadata">

**Author:** [@Steven\_Varga](https://discourse.julialang.org/u/Steven_Varga)\
**Replies:** 11\
**Last updated:** [December 30, 2020, 4:52am UTC](https://discourse.julialang.org/t/vscode-julia-doesnt-find-intel-mkl-shared-objects/52232 "2020-12-30T04:52:49Z")

</div>

Intel MKL and compiler have provides scripts to control library path, which is/are required to be sourced before starting up the MKL linked julia; can someone point out how to work around this when using julia linked wit…

---

## [Running Tests vs. Debugging gives different results](https://discourse.julialang.org/t/running-tests-vs-debugging-gives-different-results/52554)

<div class="topic-metadata">

**Author:** [@jasonhnicholson](https://discourse.julialang.org/u/jasonhnicholson)\
**Replies:** 7\
**Last updated:** [December 30, 2020, 12:46am UTC](https://discourse.julialang.org/t/running-tests-vs-debugging-gives-different-results/52554 "2020-12-30T00:46:02Z")

</div>

When I normally run tester.jl below that calls my function encode(), it fails with a stack trace. When I debug run it in VS Code, it runs fine and does not fail. I even get the answer I expect. I am using VScode 1.52.1 w…

---

## [Struct as subtype of multiple types](https://discourse.julialang.org/t/struct-as-subtype-of-multiple-types/52357)

<div class="topic-metadata">

**Author:** [@pranshumalik14](https://discourse.julialang.org/u/pranshumalik14)\
**Replies:** 8\
**Last updated:** [December 30, 2020, 12:45am UTC](https://discourse.julialang.org/t/struct-as-subtype-of-multiple-types/52357 "2020-12-30T00:45:03Z")

</div>

I am trying to create 2 groups of abstract types to be for different purposes. A quick example can be an abstract type GeometricEntity of which both AbstractPoint (supertype for n-dimensional points) and GeometricEntity2…

---

## [Simulating MOSFET equations with ModelingToolkit](https://discourse.julialang.org/t/simulating-mosfet-equations-with-modelingtoolkit/52408)

<div class="topic-metadata">

**Author:** [@pepijndevos](https://discourse.julialang.org/u/pepijndevos)\
**Replies:** 18\
**Last updated:** [December 30, 2020, 12:10am UTC](https://discourse.julialang.org/t/simulating-mosfet-equations-with-modelingtoolkit/52408 "2020-12-30T00:10:04Z")

</div>

Hello, I’m trying to model a MOSFET with ModelingToolkit using the most basic quadratic model, but having a lot of issues. The equations I came up with so far are as follows: using ModelingToolkit, OrdinaryDiffEq func…

---

## [Beginning to compare LTSpice and Julia Diff Eq](https://discourse.julialang.org/t/beginning-to-compare-ltspice-and-julia-diff-eq/51988)

<div class="topic-metadata">

**Author:** [@klaff](https://discourse.julialang.org/u/klaff)\
**Replies:** 8\
**Last updated:** [December 30, 2020, 12:08am UTC](https://discourse.julialang.org/t/beginning-to-compare-ltspice-and-julia-diff-eq/51988 "2020-12-30T00:08:33Z")

</div>

I’ve been doing mixed simulations (some electronics, some physics, some digital control) for a bit and wrote up a little Pluto notebook comparing a tank circuit simulation in LTSpice and using DiffEq. I was surprised at …

---

## [Question on allocations for push pop of arrays](https://discourse.julialang.org/t/question-on-allocations-for-push-pop-of-arrays/52593)

<div class="topic-metadata">

**Author:** [@asyrov](https://discourse.julialang.org/u/asyrov)\
**Replies:** 5\
**Last updated:** [December 29, 2020, 11:37pm UTC](https://discourse.julialang.org/t/question-on-allocations-for-push-pop-of-arrays/52593 "2020-12-29T23:37:02Z")

</div>

Need do confirm that if we do push! to array of a single element it reallocates with just one extra space for new element (in opposite to, say, preallocate 2 times more elements for better average performance). Thanks!

---

## [Slow Pkg operations (MacOS)](https://discourse.julialang.org/t/slow-pkg-operations-macos/52595)

<div class="topic-metadata">

**Author:** [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Replies:** 0\
**Last updated:** [December 29, 2020, 11:01pm UTC](https://discourse.julialang.org/t/slow-pkg-operations-macos/52595 "2020-12-29T23:01:13Z")

</div>

There have been several discussions about slow package operations on Windows 10. I have a similar problem on MacOS (Big Sur, but also the previous version; Julia 1.5.3). I observe that anti-virus uses a lot of cpu durin…

---

## [Inner parametric type constructor not defined error](https://discourse.julialang.org/t/inner-parametric-type-constructor-not-defined-error/52592)

<div class="topic-metadata">

**Author:** [@mkarikom](https://discourse.julialang.org/u/mkarikom)\
**Replies:** 1\
**Last updated:** [December 29, 2020, 10:41pm UTC](https://discourse.julialang.org/t/inner-parametric-type-constructor-not-defined-error/52592 "2020-12-29T22:41:50Z")

</div>

I have the following parametric type newInt, which works, but adding an inner constructor that fills in certain fields causes errors: struct newInt{U,V} u::U v::V n::DataType end julia\> newInt(10,"a",String…

---

## [STATA way more used by economists than R/Python/Matlab?](https://discourse.julialang.org/t/stata-way-more-used-by-economists-than-r-python-matlab/52585)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 4\
**Last updated:** [December 29, 2020, 10:11pm UTC](https://discourse.julialang.org/t/stata-way-more-used-by-economists-than-r-python-matlab/52585 "2020-12-29T22:11:41Z")

</div>

I come across this chart, from a recent paper (can’t attach PDFs) in AEA (American economic Association) Papers and Proceedings, and got very surprised to see that STATA dominate all other software used to produce empiri…

---

## [How to set face color per triangle when using plot\_trisurf in PyPlot](https://discourse.julialang.org/t/how-to-set-face-color-per-triangle-when-using-plot-trisurf-in-pyplot/4662)

<div class="topic-metadata">

**Author:** [@fruno](https://discourse.julialang.org/u/fruno)\
**Replies:** 9\
**Last updated:** [December 29, 2020, 9:56pm UTC](https://discourse.julialang.org/t/how-to-set-face-color-per-triangle-when-using-plot-trisurf-in-pyplot/4662 "2020-12-29T21:56:31Z")

</div>

Hi, I want to set the face color of each triangle individually when plotting with plot\_trisurf in PyPlot. The matplotlib manual seems to indicate that face color is set with the option ‘color’ (as a tuple), but there is …

---

## [Could not load library libGL.so.1](https://discourse.julialang.org/t/could-not-load-library-libgl-so-1/52340)

<div class="topic-metadata">

**Author:** [@Peter\_Adelman](https://discourse.julialang.org/u/Peter_Adelman)\
**Replies:** 6\
**Last updated:** [December 29, 2020, 9:23pm UTC](https://discourse.julialang.org/t/could-not-load-library-libgl-so-1/52340 "2020-12-29T21:23:20Z")

</div>

GR.jl depends on GR\_jll.jl depends on Qt\_jll.jl I am getting an error when I try to make a sysimage in a CentOS 7 container (x86\_64 gnu linux) while behind a firewall, seemingly from this line: ERROR: InitError: could …

---

## [Auto-switch between discourse's light and dark theme](https://discourse.julialang.org/t/auto-switch-between-discourses-light-and-dark-theme/52448)

<div class="topic-metadata">

**Author:** [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Replies:** 4\
**Last updated:** [December 29, 2020, 8:37pm UTC](https://discourse.julialang.org/t/auto-switch-between-discourses-light-and-dark-theme/52448 "2020-12-29T20:37:38Z")

</div>

Is it somehow possible to auto-switch between the light and dark theme of our discourse depending on my macOS light/dark mode? That would be awesome… Manual switching takes way too many clicks (7-8). Alternatively, it w…

---

## [Log-polar transform of an image](https://discourse.julialang.org/t/log-polar-transform-of-an-image/52004)

<div class="topic-metadata">

**Author:** [@rveltz](https://discourse.julialang.org/u/rveltz)\
**Replies:** 9\
**Last updated:** [December 29, 2020, 8:30pm UTC](https://discourse.julialang.org/t/log-polar-transform-of-an-image/52004 "2020-12-29T20:30:31Z")

</div>

Hi, I would like to perform the log-polar transform of an image. I tried. I failed. Maybe this is obvious to some of you… First, I deal with the polar transform. The trouble seems to come from a specific type of images …

---

## ["Pluto" memory usage](https://discourse.julialang.org/t/pluto-memory-usage/52493)

<div class="topic-metadata">

**Author:** [@vshesh](https://discourse.julialang.org/u/vshesh)\
**Replies:** 9\
**Last updated:** [December 29, 2020, 7:59pm UTC](https://discourse.julialang.org/t/pluto-memory-usage/52493 "2020-12-29T19:59:16Z")

</div>

I had a session of pluto open and I was doing some standard machine learning tasks, like: loading a data frame with ~3000 entries doing some clustering training some models evaluating some models making plots to see wh…

---

## [Error when estimating parameters in a multi-level ODE model](https://discourse.julialang.org/t/error-when-estimating-parameters-in-a-multi-level-ode-model/52555)

<div class="topic-metadata">

**Author:** [@andriizayac](https://discourse.julialang.org/u/andriizayac)\
**Replies:** 2\
**Last updated:** [December 29, 2020, 6:58pm UTC](https://discourse.julialang.org/t/error-when-estimating-parameters-in-a-multi-level-ode-model/52555 "2020-12-29T18:58:41Z")

</div>

Hi all, I’m trying to estimate parameters in a logistic growth model with varying parameters using @DifferentialEquations.jl and @Turing.jl. Starting from the simplest case, I’d like to estimate K for each equation in t…

---

## [Multiplying columns in DataFrames](https://discourse.julialang.org/t/multiplying-columns-in-dataframes/52069)

<div class="topic-metadata">

**Author:** [@Smith](https://discourse.julialang.org/u/Smith)\
**Replies:** 10\
**Last updated:** [December 29, 2020, 6:51pm UTC](https://discourse.julialang.org/t/multiplying-columns-in-dataframes/52069 "2020-12-29T18:51:30Z")

</div>

How can I multiply values in one column by other columns containing numerical data? Suppose a dataframe df\_1 is given by df\_1 = DataFrame(NAME = \["Aa","Bb","AB","CD","EF","GH"\], SCORE=\[0,1,10,20,30,45\], VALUE =\[400,200…

---

## [\[ANN\] GFIlogisticRegression](https://discourse.julialang.org/t/ann-gfilogisticregression/52581)

<div class="topic-metadata">

**Author:** [@stla](https://discourse.julialang.org/u/stla)\
**Replies:** 0\
**Last updated:** [December 29, 2020, 6:05pm UTC](https://discourse.julialang.org/t/ann-gfilogisticregression/52581 "2020-12-29T18:05:11Z")

</div>

Hello, Announcing my third Julia package: Generalized fiducial inference for logistic regression. Roughly speaking, fiducial statistics is “Bayesian statistics without prior”: similarly to the Bayesian inference, the f…

---

## [Error in returning value from function loop](https://discourse.julialang.org/t/error-in-returning-value-from-function-loop/52576)

<div class="topic-metadata">

**Author:** [@Luigi\_Marongiu](https://discourse.julialang.org/u/Luigi_Marongiu)\
**Replies:** 4\
**Last updated:** [December 29, 2020, 6:02pm UTC](https://discourse.julialang.org/t/error-in-returning-value-from-function-loop/52576 "2020-12-29T18:02:22Z")

</div>

Hello, I have a function like this: function ricky(x, k, r, I) for i in 1:I println("T", i, "\\t= ", x) q = 1-x/k y = x \* exp(r\*q) x = y end return y end when I launch it, I get: julia\> ricky(500…

---

## [Can't Download GLFW during Pkg.update](https://discourse.julialang.org/t/cant-download-glfw-during-pkg-update/52523)

<div class="topic-metadata">

**Author:** [@jasonhnicholson](https://discourse.julialang.org/u/jasonhnicholson)\
**Replies:** 1\
**Last updated:** [December 29, 2020, 5:56pm UTC](https://discourse.julialang.org/t/cant-download-glfw-during-pkg-update/52523 "2020-12-29T17:56:10Z")

</div>

I having trouble with pkg update. What should I do or read? I am new to Julia. Thank you. (@v1.5) pkg\> update Updating registry at \`C:\\Users\\jason\\.julia\\registries\\General\` Downloading artifact: GLFW Exception calli…

---

## [Plots.jl: shared colorbar with subplots?](https://discourse.julialang.org/t/plots-jl-shared-colorbar-with-subplots/47269)

<div class="topic-metadata">

**Author:** [@DanielIngraham](https://discourse.julialang.org/u/DanielIngraham)\
**Replies:** 6\
**Last updated:** [December 29, 2020, 5:19pm UTC](https://discourse.julialang.org/t/plots-jl-shared-colorbar-with-subplots/47269 "2020-12-29T17:19:23Z")

</div>

I’d like to be able to create an array of subplots with a shared colorbar, i.e., just one colorbar for all subplots. Is that possible? using Plots function doit() x1 = range(0.0, 1.0, length=51) y1 = range(-1.0…

---

## [DataFrame vector to columns](https://discourse.julialang.org/t/dataframe-vector-to-columns/52577)

<div class="topic-metadata">

**Author:** [@ZettEff](https://discourse.julialang.org/u/ZettEff)\
**Replies:** 2\
**Last updated:** [December 29, 2020, 5:05pm UTC](https://discourse.julialang.org/t/dataframe-vector-to-columns/52577 "2020-12-29T17:05:34Z")

</div>

I tried to find a way to transform a column containing vectors (all of equal length) as values into columns per vector element. df = DataFrame(data=rand(3), list\_data=\[\[1, 2\], \[3, 4\], \[5, 6\]\]) transform(df, :list\_data =\>…

---

## [Varargs of vectors and scalars under modulo](https://discourse.julialang.org/t/varargs-of-vectors-and-scalars-under-modulo/52548)

<div class="topic-metadata">

**Author:** [@jakewilliami](https://discourse.julialang.org/u/jakewilliami)\
**Replies:** 5\
**Last updated:** [December 29, 2020, 4:45pm UTC](https://discourse.julialang.org/t/varargs-of-vectors-and-scalars-under-modulo/52548 "2020-12-29T16:45:57Z")

</div>

How would I go about expanding the following code for any number of vectors (possibly using Iterators or @nloops)? My code below shows it working for the first three vectors. function list\_span(u̲::Vector{T}, v̲::Vecto…

---

## [Multiple Dispatch Across Seperate Files](https://discourse.julialang.org/t/multiple-dispatch-across-seperate-files/52480)

<div class="topic-metadata">

**Author:** [@Kieran\_Gill](https://discourse.julialang.org/u/Kieran_Gill)\
**Replies:** 16\
**Last updated:** [December 29, 2020, 4:44pm UTC](https://discourse.julialang.org/t/multiple-dispatch-across-seperate-files/52480 "2020-12-29T16:44:25Z")

</div>

I am attempting to use the same function forward in different contexts. Layers.jl module Layers export Dense, forward struct Dense n\_inputs n\_neurons weights biases function Dense(n\_inputs, n\_neur…

---

## [Recursive merge for named tuples](https://discourse.julialang.org/t/recursive-merge-for-named-tuples/52072)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 12\
**Last updated:** [December 29, 2020, 4:33pm UTC](https://discourse.julialang.org/t/recursive-merge-for-named-tuples/52072 "2020-12-29T16:33:50Z")

</div>

On the Turing call this morning, I mentioned a need for a very efficient recursive merge on named tuples. @mohamed82008 asked where this need comes in, and… I guess it was too early? Coffee hadn’t kicked in? Something l…

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

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