# Latest

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

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

**Page:** 1848

---

## [Need help debugging an NLopt optimization](https://discourse.julialang.org/t/need-help-debugging-an-nlopt-optimization/33229)

<div class="topic-metadata">

**Author:** [@mingjia1025](https://discourse.julialang.org/u/mingjia1025)\
**Replies:** 1\
**Last updated:** [January 11, 2020, 8:01am UTC](https://discourse.julialang.org/t/need-help-debugging-an-nlopt-optimization/33229 "2020-01-11T08:01:48Z")

</div>

I’m trying to use the LD\_MMA algoritmn in NLopt to fit my model. I get Xtol reached after 2 iterations and the values of the variables don’t seem to change from the starting values. Actually when I leave out the xtol re…

---

## [Capturing where-clause using MacroTools](https://discourse.julialang.org/t/capturing-where-clause-using-macrotools/33223)

<div class="topic-metadata">

**Author:** [@tk3369](https://discourse.julialang.org/u/tk3369)\
**Replies:** 3\
**Last updated:** [January 11, 2020, 2:29am UTC](https://discourse.julialang.org/t/capturing-where-clause-using-macrotools/33223 "2020-01-11T02:29:48Z")

</div>

Hi there! I wonder if anyone can help me with this… I would like to write a macro that takes a function definition and modifies it to do something at the beginning and at the end. So I cooked up this MWE but I got stuc…

---

## [Best way to pass auxiliary arrays to Knet loss function](https://discourse.julialang.org/t/best-way-to-pass-auxiliary-arrays-to-knet-loss-function/33227)

<div class="topic-metadata">

**Author:** [@dfenn](https://discourse.julialang.org/u/dfenn)\
**Replies:** 0\
**Last updated:** [January 11, 2020, 1:58am UTC](https://discourse.julialang.org/t/best-way-to-pass-auxiliary-arrays-to-knet-loss-function/33227 "2020-01-11T01:58:10Z")

</div>

Julia beginner here, so I apologize if this is an obvious question. I’m implementing a model using Knet, and I’m writing a loss function that includes a penalty term that relies on information that is provided from outsi…

---

## [Custom adjoint for getindex in Zygote](https://discourse.julialang.org/t/custom-adjoint-for-getindex-in-zygote/33225)

<div class="topic-metadata">

**Author:** [@wgm](https://discourse.julialang.org/u/wgm)\
**Replies:** 0\
**Last updated:** [January 11, 2020, 1:37am UTC](https://discourse.julialang.org/t/custom-adjoint-for-getindex-in-zygote/33225 "2020-01-11T01:37:25Z")

</div>

I am new to Zygote and have a question about defining my own adjoint involving getindex with custom indexing. I’ve defined a type import Base: getindex struct ProbTensor{N} elements::Array{Float64,N} end function g…

---

## [How to scatter plot in Makie with custom marker shape](https://discourse.julialang.org/t/how-to-scatter-plot-in-makie-with-custom-marker-shape/33224)

<div class="topic-metadata">

**Author:** [@babaq](https://discourse.julialang.org/u/babaq)\
**Replies:** 0\
**Last updated:** [January 11, 2020, 1:10am UTC](https://discourse.julialang.org/t/how-to-scatter-plot-in-makie-with-custom-marker-shape/33224 "2020-01-11T01:10:22Z")

</div>

I see Plots support custom shape(defined by vertices) as marker, but how to do this in Makie.

---

## [For loop Performance](https://discourse.julialang.org/t/for-loop-performance/33214)

<div class="topic-metadata">

**Author:** [@sam1988](https://discourse.julialang.org/u/sam1988)\
**Replies:** 8\
**Last updated:** [January 11, 2020, 12:16am UTC](https://discourse.julialang.org/t/for-loop-performance/33214 "2020-01-11T00:16:33Z")

</div>

Can somebody help me in speeding up following function function mean\_loop(p::AbstractArray,q::AbstractArray) a = p; a1 = q; z=0.0; for i in 1:length(a1) s=0.0; @inbounds s= mean(a .\> a1\[i\]); z+= s; s=0.0 end r…

---

## [Custom StaticArray type](https://discourse.julialang.org/t/custom-staticarray-type/33193)

<div class="topic-metadata">

**Author:** [@tomtom](https://discourse.julialang.org/u/tomtom)\
**Replies:** 2\
**Last updated:** [January 10, 2020, 8:32pm UTC](https://discourse.julialang.org/t/custom-staticarray-type/33193 "2020-01-10T20:32:31Z")

</div>

from StaticArrays doc, we can “easily” create our own StaticArray type… unfortunately no example is provided on the doc… could someone be nice enough to post an example (of immutable type is good enough)? many thanks.

---

## [\[ANN\] TagBot: Creates tags and releases for your Julia packages when they're registered](https://discourse.julialang.org/t/ann-tagbot-creates-tags-and-releases-for-your-julia-packages-when-theyre-registered/23084)

<div class="topic-metadata">

**Author:** [@christopher-dG](https://discourse.julialang.org/u/christopher-dG)\
**Replies:** 53\
**Last updated:** [January 6, 2020, 8:20pm UTC](https://discourse.julialang.org/t/ann-tagbot-creates-tags-and-releases-for-your-julia-packages-when-theyre-registered/23084 "2020-01-06T20:20:53Z")

</div>

Hello! In anticipation of the new package registration system I’d like to announce Julia TagBot, which will handle your packages’ GitHub releases automatically. It’s a GitHub App, so just install and forget about it — n…

---

## [Ray traversing voxelized cube](https://discourse.julialang.org/t/ray-traversing-voxelized-cube/33065)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 4\
**Last updated:** [January 10, 2020, 8:04pm UTC](https://discourse.julialang.org/t/ray-traversing-voxelized-cube/33065 "2020-01-10T20:04:44Z")

</div>

I have a ray, that traverses a voxelized cube. I want to know, which voxels are traversed by the ray and which are not. Here is a picture in 2d: Is there some julia package that can help?

---

## [Does Julia support hardware, which does not provide twos' complement integers?](https://discourse.julialang.org/t/does-julia-support-hardware-which-does-not-provide-twos-complement-integers/33092)

<div class="topic-metadata">

**Author:** [@klacru](https://discourse.julialang.org/u/klacru)\
**Replies:** 13\
**Last updated:** [January 10, 2020, 6:13pm UTC](https://discourse.julialang.org/t/does-julia-support-hardware-which-does-not-provide-twos-complement-integers/33092 "2020-01-10T18:13:24Z")

</div>

In the function gcd in intfuncs.jl I saw, that the logic depends on the twos’ complement representation of integers. It would be important to avoid that, if Julia claimed to support the rare processor architectures not …

---

## [Performance Tips for Combinatorial Problem](https://discourse.julialang.org/t/performance-tips-for-combinatorial-problem/32208)

<div class="topic-metadata">

**Author:** [@jmcastro2109](https://discourse.julialang.org/u/jmcastro2109)\
**Replies:** 16\
**Last updated:** [January 10, 2020, 5:50pm UTC](https://discourse.julialang.org/t/performance-tips-for-combinatorial-problem/32208 "2020-01-10T17:50:43Z")

</div>

Hello! I have a combinatorial discrete choice problem that I solve by Backward Induction. The problem seems to be intensive in both memory and computation time and I would be super happy to improve it on any of these two…

---

## [Diagonalizations.jl: a package for multivariate linear filtering](https://discourse.julialang.org/t/diagonalizations-jl-a-package-for-multivariate-linear-filtering/32990)

<div class="topic-metadata">

**Author:** [@Marco-Congedo](https://discourse.julialang.org/u/Marco-Congedo)\
**Replies:** 4\
**Last updated:** [January 10, 2020, 5:37pm UTC](https://discourse.julialang.org/t/diagonalizations-jl-a-package-for-multivariate-linear-filtering/32990 "2020-01-10T17:37:07Z")

</div>

I would like to announce Diagonalizations.jl, a new package for multivariate statistics/signal processing. Currently it implements the following linear filters: Acronym Full Name Datasets ( m ) Observations ( k ) …

---

## [FiniteDiff.jl: Fast (Sparse) Gradients, Jacobians, Hessians!](https://discourse.julialang.org/t/finitediff-jl-fast-sparse-gradients-jacobians-hessians/32976)

<div class="topic-metadata">

**Author:** [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Replies:** 9\
**Last updated:** [January 10, 2020, 5:22pm UTC](https://discourse.julialang.org/t/finitediff-jl-fast-sparse-gradients-jacobians-hessians/32976 "2020-01-10T17:22:18Z")

</div>

FiniteDiff.jl is a new Julia library for fast gradients, Jacobians, and Hessians which supports sparsity and GPUs! Okay, I lied, it’s not an entirely new library. It’s the next incarnation of what was known as DiffEqD…

---

## [Type instability of getfield()](https://discourse.julialang.org/t/type-instability-of-getfield/33205)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 5\
**Last updated:** [January 10, 2020, 5:10pm UTC](https://discourse.julialang.org/t/type-instability-of-getfield/33205 "2020-01-10T17:10:17Z")

</div>

See the following example julia\> struct Bar{T\<:Real} x::T end julia\> struct Foo{T \<: Real} bars::Array{Bar{T},1} end julia\> foo = Foo(fill(Bar(rand()),2)) Foo{Float64}(Bar{Float64}\[Bar{Floa…

---

## [\[ANN\] Calendars.jl](https://discourse.julialang.org/t/ann-calendars-jl/33204)

<div class="topic-metadata">

**Author:** [@wookyoung](https://discourse.julialang.org/u/wookyoung)\
**Replies:** 0\
**Last updated:** [January 10, 2020, 4:24pm UTC](https://discourse.julialang.org/t/ann-calendars-jl/33204 "2020-01-10T16:24:28Z")

</div>

Happy new year! this is not a registered package and I don’t have an idea about the proper name for it. it works like Charles Dye’s cal that was present and have used from almost 50 years ago. $ cal January 2020 …

---

## [Save objective values in an optimization loop](https://discourse.julialang.org/t/save-objective-values-in-an-optimization-loop/33192)

<div class="topic-metadata">

**Author:** [@yordiak](https://discourse.julialang.org/u/yordiak)\
**Replies:** 2\
**Last updated:** [January 10, 2020, 2:43pm UTC](https://discourse.julialang.org/t/save-objective-values-in-an-optimization-loop/33192 "2020-01-10T14:43:42Z")

</div>

Hello, here is my code using JuMP, Plots, Gurobi m=Model(with\_optimizer(Gurobi.Optimizer)) @variable(m, x\>=0) @variable(m, y\>=0) k=0 obj\_val=true while k\<=1 φ(x,y)=3\*x+k\*y @objective(m, Max, φ(x,y)) …

---

## [Inner contructor with parametric type](https://discourse.julialang.org/t/inner-contructor-with-parametric-type/33170)

<div class="topic-metadata">

**Author:** [@aaraujo71](https://discourse.julialang.org/u/aaraujo71)\
**Replies:** 9\
**Last updated:** [January 10, 2020, 11:52am UTC](https://discourse.julialang.org/t/inner-contructor-with-parametric-type/33170 "2020-01-10T11:52:14Z")

</div>

I am trying to create a structure where parameter types can either be given explicitly or are inferred automatically from the arguments. However, I also would like to define the inner constructor method, such as in the f…

---

## [How to extract edge list/contour from image using Images.jl](https://discourse.julialang.org/t/how-to-extract-edge-list-contour-from-image-using-images-jl/25927)

<div class="topic-metadata">

**Author:** [@ruszkipista](https://discourse.julialang.org/u/ruszkipista)\
**Replies:** 2\
**Last updated:** [January 9, 2020, 3:25pm UTC](https://discourse.julialang.org/t/how-to-extract-edge-list-contour-from-image-using-images-jl/25927 "2020-01-09T15:25:59Z")

</div>

I am new to Julia and image processing. I need to implement geometrical shape (e.g. triangle, rectangle) detection for a course assignment. I want to solve it using Julia only (not e.g. opencv) I found an article doing …

---

## [Nested environments in package](https://discourse.julialang.org/t/nested-environments-in-package/33157)

<div class="topic-metadata">

**Author:** [@racinmat](https://discourse.julialang.org/u/racinmat)\
**Replies:** 5\
**Last updated:** [January 10, 2020, 9:52am UTC](https://discourse.julialang.org/t/nested-environments-in-package/33157 "2020-01-10T09:52:52Z")

</div>

Hi, I have a package with the usual structure, but I also have examples here, because I believe runnable code is more useful than snippets in md. So the structure is something like - examples/ - src/ - test/ - Proje…

---

## [Feedback on benchmark](https://discourse.julialang.org/t/feedback-on-benchmark/33186)

<div class="topic-metadata">

**Author:** [@jw3126](https://discourse.julialang.org/u/jw3126)\
**Replies:** 0\
**Last updated:** [January 10, 2020, 9:23am UTC](https://discourse.julialang.org/t/feedback-on-benchmark/33186 "2020-01-10T09:23:06Z")

</div>

It is my understanding that hardware operations do not always take the same amount of cycles on a given type. For instance it seems that fma is slower on subnormal floats then on normal floats. I wanted to observe this …

---

## [Munich Julia User Group meetup launched](https://discourse.julialang.org/t/munich-julia-user-group-meetup-launched/33184)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 0\
**Last updated:** [January 10, 2020, 7:01am UTC](https://discourse.julialang.org/t/munich-julia-user-group-meetup-launched/33184 "2020-01-10T07:01:53Z")

</div>

Dear all, an official meetup Julia User Group in Munich is founded and the first kickoff meeting planned. It will be on Wednesday 05.02. in Munich (near Donnersberger Brücke). Feel welcome to join and to spread the w…

---

## [How to update vertex / node color in a loop using Metagraphs](https://discourse.julialang.org/t/how-to-update-vertex-node-color-in-a-loop-using-metagraphs/33183)

<div class="topic-metadata">

**Author:** [@Imran\_Mustafa](https://discourse.julialang.org/u/Imran_Mustafa)\
**Replies:** 0\
**Last updated:** [January 10, 2020, 6:45am UTC](https://discourse.julialang.org/t/how-to-update-vertex-node-color-in-a-loop-using-metagraphs/33183 "2020-01-10T06:45:31Z")

</div>

New user here. I was wondering how we can update the vertex / node color in a loop and display the updated graph in the same loop as exampled below (the example is for Mathematica) Couldn’t find explicit documentation…

---

## [Maximum Likelihood Multivariate Model](https://discourse.julialang.org/t/maximum-likelihood-multivariate-model/33156)

<div class="topic-metadata">

**Author:** [@Maximilian](https://discourse.julialang.org/u/Maximilian)\
**Replies:** 15\
**Last updated:** [January 10, 2020, 12:09am UTC](https://discourse.julialang.org/t/maximum-likelihood-multivariate-model/33156 "2020-01-10T00:09:06Z")

</div>

I am trying to optimize a likelihood function for the multivariate case. This is the code I am using using Optim, LinearAlgebra, ForwardDiff #observed covariance cov\_obs = \[1.3629 0.408729 0.581832 0.…

---

## [How to know why a Julia package is downgraded?](https://discourse.julialang.org/t/how-to-know-why-a-julia-package-is-downgraded/33163)

<div class="topic-metadata">

**Author:** [@homocomputeris](https://discourse.julialang.org/u/homocomputeris)\
**Replies:** 5\
**Last updated:** [January 9, 2020, 8:56pm UTC](https://discourse.julialang.org/t/how-to-know-why-a-julia-package-is-downgraded/33163 "2020-01-09T20:56:37Z")

</div>

Sometimes packages seem to be randomly downgraded while update is run: (v1.3) pkg\> update Updating registry at \`~/.julia/registries/General\` Updating git-repo \`https://github.com/JuliaRegistries/General.git\` Resolv…

---

## [Strategy for using multiple threads in an in-place matrix operation](https://discourse.julialang.org/t/strategy-for-using-multiple-threads-in-an-in-place-matrix-operation/33039)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 3\
**Last updated:** [January 9, 2020, 8:33pm UTC](https://discourse.julialang.org/t/strategy-for-using-multiple-threads-in-an-in-place-matrix-operation/33039 "2020-01-09T20:33:21Z")

</div>

When fitting a linear mixed effects model using the MixedModels package most of the time is spent updating a Cholesky factorization of a blocked array. Within that updating operation a large part of the time is spend on…

---

## [Are the entries in a vector of immutable structs stored in place, or is there always a pointer to the heap?](https://discourse.julialang.org/t/are-the-entries-in-a-vector-of-immutable-structs-stored-in-place-or-is-there-always-a-pointer-to-the-heap/33141)

<div class="topic-metadata">

**Author:** [@Sean\_Matthews](https://discourse.julialang.org/u/Sean_Matthews)\
**Replies:** 10\
**Last updated:** [January 9, 2020, 6:06pm UTC](https://discourse.julialang.org/t/are-the-entries-in-a-vector-of-immutable-structs-stored-in-place-or-is-there-always-a-pointer-to-the-heap/33141 "2020-01-09T18:06:04Z")

</div>

Are the entries in a vector of immutable structs stored in place, or is there always a pointer to the heap? (Or how can I get Julia to do something equivalent). I have a question about the interplay between vectors a…

---

## [Correct argument type for ::Array{Array{\<:Real,1},1})](https://discourse.julialang.org/t/correct-argument-type-for-array-array-real-1-1/33164)

<div class="topic-metadata">

**Author:** [@HenriDeh](https://discourse.julialang.org/u/HenriDeh)\
**Replies:** 6\
**Last updated:** [January 9, 2020, 6:03pm UTC](https://discourse.julialang.org/t/correct-argument-type-for-array-array-real-1-1/33164 "2020-01-09T18:03:45Z")

</div>

I would like to understand why function foo(A::Array{Array{\<:Real,1},1}) end does not accept foo(fill(Float64\[\],10)) I know that function foo(A::Array{Array{T,1},1}) where T \<: Real end works but I need to understa…

---

## [Hello everybody, and a question on REPL](https://discourse.julialang.org/t/hello-everybody-and-a-question-on-repl/33162)

<div class="topic-metadata">

**Author:** [@Darione](https://discourse.julialang.org/u/Darione)\
**Replies:** 2\
**Last updated:** [January 9, 2020, 5:41pm UTC](https://discourse.julialang.org/t/hello-everybody-and-a-question-on-repl/33162 "2020-01-09T17:41:26Z")

</div>

Hello everyone. I am a beginner in Julia, but have used Python several times in the past and am used to using REPL to develop. I was now trying out Julia’s REPL, in the Juno editor. I realized with surprise (very like …

---

## [CSV.write("\*.txt",DataFrame) ReadOnlyMemoryError()](https://discourse.julialang.org/t/csv-write-txt-dataframe-readonlymemoryerror/33085)

<div class="topic-metadata">

**Author:** [@BMval](https://discourse.julialang.org/u/BMval)\
**Replies:** 14\
**Last updated:** [January 9, 2020, 5:42pm UTC](https://discourse.julialang.org/t/csv-write-txt-dataframe-readonlymemoryerror/33085 "2020-01-09T17:42:46Z")

</div>

Does somebody have the same error? How to deal with it. Dataframe is quite big: 339000\*18 (String type). Is the problem connected to size? Thank you in advance.

---

## [Losing some output from redirect\_stdout() on remote workers](https://discourse.julialang.org/t/losing-some-output-from-redirect-stdout-on-remote-workers/33153)

<div class="topic-metadata">

**Author:** [@healyp](https://discourse.julialang.org/u/healyp)\
**Replies:** 2\
**Last updated:** [January 9, 2020, 4:52pm UTC](https://discourse.julialang.org/t/losing-some-output-from-redirect-stdout-on-remote-workers/33153 "2020-01-09T16:52:01Z")

</div>

I’m running some CPLEX (a Math. Programming solver) jobs as remote jobs and trapping each job’s output with the following (more or less): local res open(traceFile, "w") do out # https://discourse.julialang.org/t…

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

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