# Latest

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

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

**Page:** 1700

---

## [Which modules to choose](https://discourse.julialang.org/t/which-modules-to-choose/42456)

<div class="topic-metadata">

**Author:** [@gtraeger](https://discourse.julialang.org/u/gtraeger)\
**Replies:** 4\
**Last updated:** [July 3, 2020, 2:21pm UTC](https://discourse.julialang.org/t/which-modules-to-choose/42456 "2020-07-03T14:21:19Z")

</div>

I want to program a simple retirement forecast cash flow model using time series, cash flows and plots. If I was programming in Python I would use Pandas for all of these functions. What modules would I use in Julia? Da…

---

## [Get to know the seed for the next CUDA random number](https://discourse.julialang.org/t/get-to-know-the-seed-for-the-next-cuda-random-number/42363)

<div class="topic-metadata">

**Author:** [@Ferran\_Mazzanti](https://discourse.julialang.org/u/Ferran_Mazzanti)\
**Replies:** 3\
**Last updated:** [July 3, 2020, 2:19pm UTC](https://discourse.julialang.org/t/get-to-know-the-seed-for-the-next-cuda-random-number/42363 "2020-07-03T14:19:57Z")

</div>

Hi, I’m struggling to debug a code that does random sampling, and for that I use CUDA random numbers. In order to be able to reproduce the same numbers in a second run of the code, I set the random number generator usin…

---

## [Creating iterators for tuples of arbitrary dimension](https://discourse.julialang.org/t/creating-iterators-for-tuples-of-arbitrary-dimension/42154)

<div class="topic-metadata">

**Author:** [@iamsuddhasattwa](https://discourse.julialang.org/u/iamsuddhasattwa)\
**Replies:** 7\
**Last updated:** [July 3, 2020, 1:45pm UTC](https://discourse.julialang.org/t/creating-iterators-for-tuples-of-arbitrary-dimension/42154 "2020-07-03T13:45:07Z")

</div>

Suppose I wish to take as input some integer d and iterate over all tuples (i\_1, ... i\_d), with each entry lying in 1 to 10. For example, I may take as input a vector v of length d and compute the sum v\_1 i\_1 + ... + v\_d…

---

## [Fourier transform freezes Julia](https://discourse.julialang.org/t/fourier-transform-freezes-julia/38771)

<div class="topic-metadata">

**Author:** [@Martijn-R](https://discourse.julialang.org/u/Martijn-R)\
**Replies:** 5\
**Last updated:** [July 3, 2020, 12:56pm UTC](https://discourse.julialang.org/t/fourier-transform-freezes-julia/38771 "2020-07-03T12:56:30Z")

</div>

I am processing an audio sample (about 20minutes long) in small parts of several seconds. At the moment my code freezes every now and then. The example below is a bit silly but is a minimal ‘working’ example which oft…

---

## [Using module variables in a module function. Is there a performance disadvantage?](https://discourse.julialang.org/t/using-module-variables-in-a-module-function-is-there-a-performance-disadvantage/42465)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 4\
**Last updated:** [July 3, 2020, 12:56pm UTC](https://discourse.julialang.org/t/using-module-variables-in-a-module-function-is-there-a-performance-disadvantage/42465 "2020-07-03T12:56:30Z")

</div>

module A b = "test" function crazy\_use\_of\_b\_1() #... using A.b end function crazy\_use\_of\_b\_2(;\_b = A.b) #... using \_b end end Is there a performance difference from 1 to 2. Or problems with type stabilit…

---

## [Flux bilinear upsampling](https://discourse.julialang.org/t/flux-bilinear-upsampling/37717)

<div class="topic-metadata">

**Author:** [@kevinczimmerman](https://discourse.julialang.org/u/kevinczimmerman)\
**Replies:** 3\
**Last updated:** [July 3, 2020, 12:21pm UTC](https://discourse.julialang.org/t/flux-bilinear-upsampling/37717 "2020-07-03T12:21:49Z")

</div>

What is the best way to use Flux to create a bilinear upsampling layer? Something analogous to tensorflow bilinear upsample. I appreciate your insight in advance.

---

## [Broadcast call of callables in array](https://discourse.julialang.org/t/broadcast-call-of-callables-in-array/42468)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 2\
**Last updated:** [July 3, 2020, 11:08am UTC](https://discourse.julialang.org/t/broadcast-call-of-callables-in-array/42468 "2020-07-03T11:08:04Z")

</div>

I have an Array of callable structs that return vectors. I would like to call each of these structs with the same argument such that I get a matrix with column i being the vector returned by the callable i. struct Foo e…

---

## [Problems with skewness and kurtosis (but not mean and variance)](https://discourse.julialang.org/t/problems-with-skewness-and-kurtosis-but-not-mean-and-variance/42466)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 1\
**Last updated:** [July 3, 2020, 10:39am UTC](https://discourse.julialang.org/t/problems-with-skewness-and-kurtosis-but-not-mean-and-variance/42466 "2020-07-03T10:39:41Z")

</div>

I am using the package OnlineStats (I am open to suggested other packages) to compute the mean, variance, skewness, and kurtosis of data. The data is Array{Float64,1}. The following works fine: mean(data) var(data) b…

---

## [VegaLite: Facet plots with independent scales for histograms](https://discourse.julialang.org/t/vegalite-facet-plots-with-independent-scales-for-histograms/42464)

<div class="topic-metadata">

**Author:** [@hellemo](https://discourse.julialang.org/u/hellemo)\
**Replies:** 0\
**Last updated:** [July 3, 2020, 8:27am UTC](https://discourse.julialang.org/t/vegalite-facet-plots-with-independent-scales-for-histograms/42464 "2020-07-03T08:27:13Z")

</div>

I would like to do a facet plot with independent scales for the x-axis, but can’t get it to work. It works for the y-axis though. Any ideas? EDIT: I tried switching the axes to no avail, so it seems it has to do with th…

---

## [\[ANN\] UrlDownload.jl](https://discourse.julialang.org/t/ann-urldownload-jl/37841)

<div class="topic-metadata">

**Author:** [@Skoffer](https://discourse.julialang.org/u/Skoffer)\
**Replies:** 9\
**Last updated:** [July 3, 2020, 8:55am UTC](https://discourse.julialang.org/t/ann-urldownload-jl/37841 "2020-07-03T08:55:32Z")

</div>

UrlDownload.jl is a small packaged aimed to simplify the process of data download and conversion to the necessary format. Features In-memory data processing, no intermediate files stored. Supports csv, json, feather, …

---

## [MethodError: no method matching unsafe\_convert(::Type{Ptr{Int32}}, ::Base.RefValue{Int64})](https://discourse.julialang.org/t/methoderror-no-method-matching-unsafe-convert-type-ptr-int32-base-refvalue-int64/42424)

<div class="topic-metadata">

**Author:** [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Replies:** 9\
**Last updated:** [July 3, 2020, 8:40am UTC](https://discourse.julialang.org/t/methoderror-no-method-matching-unsafe-convert-type-ptr-int32-base-refvalue-int64/42424 "2020-07-03T08:40:03Z")

</div>

Hello, I have an error occur while running an ODE. It didn’t error 3-4 days ago, and I think DifferentialEquations.jl and Sundails.jl had an update in the meantime, so I will need to adjust my code. I think the error is…

---

## [How to stores arrays in matrices](https://discourse.julialang.org/t/how-to-stores-arrays-in-matrices/42428)

<div class="topic-metadata">

**Author:** [@BaronvonderHeyden](https://discourse.julialang.org/u/BaronvonderHeyden)\
**Replies:** 4\
**Last updated:** [July 3, 2020, 6:30am UTC](https://discourse.julialang.org/t/how-to-stores-arrays-in-matrices/42428 "2020-07-03T06:30:37Z")

</div>

Hey guys, I have a question regarding arrays and matrices: I would like to create a 2D matrix where the first column contains arrays and the second column contains integer values, e.g. Column 1 ----- Column 2 \[“a” “…

---

## [FlexLayer: A Custom Layer with Different Activation Fcns, Non-negativity, and more](https://discourse.julialang.org/t/flexlayer-a-custom-layer-with-different-activation-fcns-non-negativity-and-more/42460)

<div class="topic-metadata">

**Author:** [@jmurray](https://discourse.julialang.org/u/jmurray)\
**Replies:** 0\
**Last updated:** [July 3, 2020, 5:18am UTC](https://discourse.julialang.org/t/flexlayer-a-custom-layer-with-different-activation-fcns-non-negativity-and-more/42460 "2020-07-03T05:18:33Z")

</div>

This is a follow-up to a half-dozen posts in the past couple of weeks. I’ve had some amazing help from very generous members of this community; it’s allowed a newbie like me to make some progress! The specific posts thi…

---

## [Makie bug with tetrahedral meshes](https://discourse.julialang.org/t/makie-bug-with-tetrahedral-meshes/41834)

<div class="topic-metadata">

**Author:** [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Replies:** 13\
**Last updated:** [July 3, 2020, 3:27am UTC](https://discourse.julialang.org/t/makie-bug-with-tetrahedral-meshes/41834 "2020-07-03T03:27:52Z")

</div>

In Makie.jl there is a bug with displaying tetrahedral meshes. Using the example from TetGen.jl Note that at the corners there are missing edges and faces in the plot. However, I have verified that those edges/faces…

---

## [Mutating arrays not supported](https://discourse.julialang.org/t/mutating-arrays-not-supported/42123)

<div class="topic-metadata">

**Author:** [@jmurray](https://discourse.julialang.org/u/jmurray)\
**Replies:** 10\
**Last updated:** [July 3, 2020, 3:09am UTC](https://discourse.julialang.org/t/mutating-arrays-not-supported/42123 "2020-07-03T03:09:56Z")

</div>

I want to change the output in a custom Flux layer, but when I try to do so, I get a “Mutating arrays not supported” error. I’ve tried playing with things a bit and while I can act on the array as a whole (element-wise),…

---

## [Filter! vs filter](https://discourse.julialang.org/t/filter-vs-filter/42414)

<div class="topic-metadata">

**Author:** [@fleimgruber](https://discourse.julialang.org/u/fleimgruber)\
**Replies:** 4\
**Last updated:** [July 3, 2020, 12:12am UTC](https://discourse.julialang.org/t/filter-vs-filter/42414 "2020-07-03T00:12:50Z")

</div>

Why is the mutating version of filter failing in this example? limit = 10 marked = 2 candidates = marked:limit multiples = \[marked \* i for i in 2:fld(limit, marked)\] filter(x -\> x in multiples, candidates) gives 4-ele…

---

## [Struggling to implement Tables.jl interface for Vector{MyStruct}](https://discourse.julialang.org/t/struggling-to-implement-tables-jl-interface-for-vector-mystruct/42318)

<div class="topic-metadata">

**Author:** [@freeman](https://discourse.julialang.org/u/freeman)\
**Replies:** 8\
**Last updated:** [July 2, 2020, 10:38pm UTC](https://discourse.julialang.org/t/struggling-to-implement-tables-jl-interface-for-vector-mystruct/42318 "2020-07-02T22:38:39Z")

</div>

I’m trying to make Vector{MyStruct} a Table. One of the things that I have in mind is that I’ll be able to save Vector{MyStruct} into a parquet file by just calling write\_parquet(file, tbl), which you can see should be p…

---

## [Adjoint not defined for 3D output of ODESolution?](https://discourse.julialang.org/t/adjoint-not-defined-for-3d-output-of-odesolution/42449)

<div class="topic-metadata">

**Author:** [@yanz4](https://discourse.julialang.org/u/yanz4)\
**Replies:** 1\
**Last updated:** [July 2, 2020, 8:31pm UTC](https://discourse.julialang.org/t/adjoint-not-defined-for-3d-output-of-odesolution/42449 "2020-07-02T20:31:08Z")

</div>

I am trying to use Flux.batch for my DL model in Julia. The model is nothing but an ODE system. I want to updated the parameter on ODE by training. Without batch, the output of ODE is 2D array, which works well with tra…

---

## [My startup.jl for Revise + Juno](https://discourse.julialang.org/t/my-startup-jl-for-revise-juno/22170)

<div class="topic-metadata">

**Author:** [@ssfrr](https://discourse.julialang.org/u/ssfrr)\
**Replies:** 2\
**Last updated:** [July 2, 2020, 8:15pm UTC](https://discourse.julialang.org/t/my-startup-jl-for-revise-juno/22170 "2020-07-02T20:15:07Z")

</div>

So with the new Debugger integration into Juno there’s a lot more incentive to have Revise loaded within a Juno session, but I ran into some issues where loading Revise in my startup.jl was problematic because Atom wasn’…

---

## [Getindex without a warning?](https://discourse.julialang.org/t/getindex-without-a-warning/42382)

<div class="topic-metadata">

**Author:** [@sw72](https://discourse.julialang.org/u/sw72)\
**Replies:** 3\
**Last updated:** [July 2, 2020, 7:57pm UTC](https://discourse.julialang.org/t/getindex-without-a-warning/42382 "2020-07-02T19:57:25Z")

</div>

I need to extract a single value from a CuArray for some calculation. Is there a way to do it without getting the “scalar operations” warning?

---

## [Efficient Way of Taking First and Second Order Derivatives of a Neural Net](https://discourse.julialang.org/t/efficient-way-of-taking-first-and-second-order-derivatives-of-a-neural-net/42163)

<div class="topic-metadata">

**Author:** [@astroboy](https://discourse.julialang.org/u/astroboy)\
**Replies:** 1\
**Last updated:** [July 2, 2020, 7:42pm UTC](https://discourse.julialang.org/t/efficient-way-of-taking-first-and-second-order-derivatives-of-a-neural-net/42163 "2020-07-02T19:42:20Z")

</div>

Hey everyone, hope you’re all doing well and staying safe! I’m just going to preface this by saying that I am a still solidly a novice when it comes to both machine learning and Julia, so please bear with me here. I am a…

---

## [How to make a vector of symbols using a macro](https://discourse.julialang.org/t/how-to-make-a-vector-of-symbols-using-a-macro/42439)

<div class="topic-metadata">

**Author:** [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Replies:** 2\
**Last updated:** [July 2, 2020, 5:27pm UTC](https://discourse.julialang.org/t/how-to-make-a-vector-of-symbols-using-a-macro/42439 "2020-07-02T17:27:59Z")

</div>

How do I make a vector of symbols using a macro? macro foo() Expr(:vect, :x1, :x2) end julia\> @foo ERROR: UndefVarError: x1 not defined Clearly this making the expression \[x1, x2\]. However I would like to make the…

---

## [Start value Gurobi error](https://discourse.julialang.org/t/start-value-gurobi-error/42437)

<div class="topic-metadata">

**Author:** [@Miguel\_Goncalves](https://discourse.julialang.org/u/Miguel_Goncalves)\
**Replies:** 6\
**Last updated:** [July 2, 2020, 5:10pm UTC](https://discourse.julialang.org/t/start-value-gurobi-error/42437 "2020-07-02T17:10:48Z")

</div>

I am a casual/academic user of optimization with Julia/JuMP, and I noticed there is the possibility to include initial solution setting the function set\_start\_value, but I just want to set initially some variables of my …

---

## [Control systems](https://discourse.julialang.org/t/control-systems/42360)

<div class="topic-metadata">

**Author:** [@Ahmad\_Hably](https://discourse.julialang.org/u/Ahmad_Hably)\
**Replies:** 2\
**Last updated:** [July 2, 2020, 4:58pm UTC](https://discourse.julialang.org/t/control-systems/42360 "2020-07-02T16:58:28Z")

</div>

Dear all, Hello, I have tried ControlSystems.jl since I want to use it in my courses with engineers but it is not woking for Julia 1.4! I am novice in Julia programming. I would like to participate in the development o…

---

## [Why isn't Float32 == Float64 (Converting from Float32 to Float64)](https://discourse.julialang.org/t/why-isnt-float32-float64-converting-from-float32-to-float64/42423)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 5\
**Last updated:** [July 2, 2020, 4:01pm UTC](https://discourse.julialang.org/t/why-isnt-float32-float64-converting-from-float32-to-float64/42423 "2020-07-02T16:01:44Z")

</div>

julia\> 312.09 312.09 julia\> 312.09 |\> Float64 312.09 julia\> 312.09 |\> Float64 |\> Float32 312.09f0 julia\> 312.09 |\> Float64 |\> Float32 |\> Float64 312.0899963378906 julia\> 312.09f0 == 312.09 false Clearly this number …

---

## [CuArrays/CUDAnative PSA: Simplified package loading](https://discourse.julialang.org/t/cuarrays-cudanative-psa-simplified-package-loading/27897)

<div class="topic-metadata">

**Author:** [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Replies:** 17\
**Last updated:** [July 2, 2020, 2:20pm UTC](https://discourse.julialang.org/t/cuarrays-cudanative-psa-simplified-package-loading/27897 "2020-07-02T14:20:31Z")

</div>

Hi all, I’ve just tagged new versions of CuArrays/CUDAnative/… and among the usual slurry of features and bug fixes there’s a major change in how the packages are built and loaded. There used to be a Pkg.build step whic…

---

## [Efficient (non-allocating, in-place) getindex! for BitArray?](https://discourse.julialang.org/t/efficient-non-allocating-in-place-getindex-for-bitarray/42268)

<div class="topic-metadata">

**Author:** [@JeffFessler](https://discourse.julialang.org/u/JeffFessler)\
**Replies:** 19\
**Last updated:** [July 2, 2020, 1:30pm UTC](https://discourse.julialang.org/t/efficient-non-allocating-in-place-getindex-for-bitarray/42268 "2020-07-02T13:30:26Z")

</div>

I have an indexing operation of the form y .= x\[mask\] where mask is a BitArray. To my surprise, this is an allocating operation even though it could be done in place in compiled code. So I wrote a loop that is non-allo…

---

## [Calling the constructor outside a module works, but inside a module throws ArgumentError: ref of NULL PyObject](https://discourse.julialang.org/t/calling-the-constructor-outside-a-module-works-but-inside-a-module-throws-argumenterror-ref-of-null-pyobject/42362)

<div class="topic-metadata">

**Author:** [@Volker](https://discourse.julialang.org/u/Volker)\
**Replies:** 3\
**Last updated:** [July 2, 2020, 12:06pm UTC](https://discourse.julialang.org/t/calling-the-constructor-outside-a-module-works-but-inside-a-module-throws-argumenterror-ref-of-null-pyobject/42362 "2020-07-02T12:06:52Z")

</div>

Hi, I call the constructor of an custom python package, which I import with pyimport. Somehow it works when I do it in a script, but if I put the code into a module, it will throw an error “ArgumentError: ref of NULL Py…

---

## [The duration between two times, expressed as nearest whole minutes](https://discourse.julialang.org/t/the-duration-between-two-times-expressed-as-nearest-whole-minutes/42429)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 6\
**Last updated:** [July 2, 2020, 12:38pm UTC](https://discourse.julialang.org/t/the-duration-between-two-times-expressed-as-nearest-whole-minutes/42429 "2020-07-02T12:38:22Z")

</div>

I have two times, t1 and t2 and I wish to find the duration between these. The standard answer provided by Julia appears to be in milliseconds (and Julia also states milliseconds as part of its output). However, I need t…

---

## [Derivatives of a production function](https://discourse.julialang.org/t/derivatives-of-a-production-function/42354)

<div class="topic-metadata">

**Author:** [@amrods](https://discourse.julialang.org/u/amrods)\
**Replies:** 12\
**Last updated:** [July 2, 2020, 11:16am UTC](https://discourse.julialang.org/t/derivatives-of-a-production-function/42354 "2020-07-02T11:16:34Z")

</div>

I have a production function with several CES levels: function F(L2, A; λ=ones(4)./2, ρ=ones(4)./2) #L2 is 3x2, A is 1x1, λ and ρ are vectors of length 4 λ1 = λ\[1:2\] λ2 = λ\[3:4\] ρ1 = ρ\[1:2\] ρ2 = ρ\[3:…

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

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