# Latest

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

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

**Page:** 1688

---

## [Tuples, iterators, splats, and type stability](https://discourse.julialang.org/t/tuples-iterators-splats-and-type-stability/42849)

<div class="topic-metadata">

**Author:** [@mhauru](https://discourse.julialang.org/u/mhauru)\
**Replies:** 10\
**Last updated:** [July 17, 2020, 3:05am UTC](https://discourse.julialang.org/t/tuples-iterators-splats-and-type-stability/42849 "2020-07-17T03:05:03Z")

</div>

I’m trying understand type stability of functions like f(t::Tuple) = tuple(t...) g(t::Tuple) = tuple((identity(l) for l in t)...) identity here is meant to be a place-holder for any type stable function. Of the two, f …

---

## [Dependencies of src files inside a package](https://discourse.julialang.org/t/dependencies-of-src-files-inside-a-package/43144)

<div class="topic-metadata">

**Author:** [@oheil](https://discourse.julialang.org/u/oheil)\
**Replies:** 10\
**Last updated:** [July 17, 2020, 1:44am UTC](https://discourse.julialang.org/t/dependencies-of-src-files-inside-a-package/43144 "2020-07-17T01:44:46Z")

</div>

I am struggling with dependencies of several files inside a project (MWE package M). I have illustrated the current structure (of a MWE), which reflects the natural separation of different parts of the real project: F…

---

## [Importing packages by directory](https://discourse.julialang.org/t/importing-packages-by-directory/43140)

<div class="topic-metadata">

**Author:** [@MA\_Laforge](https://discourse.julialang.org/u/MA_Laforge)\
**Replies:** 7\
**Last updated:** [July 17, 2020, 1:35am UTC](https://discourse.julialang.org/t/importing-packages-by-directory/43140 "2020-07-17T01:35:31Z")

</div>

Question Is there a way to perform a “proper” import using a local path as an argument?: import CMDimData import\_by\_path joinpath("/path/to/CMDimData/subpkgs/EasyPlotMPL") Otherwise, does someone have a better suggesti…

---

## [Calling Julia from Python on thread](https://discourse.julialang.org/t/calling-julia-from-python-on-thread/43187)

<div class="topic-metadata">

**Author:** [@james\_p\_d](https://discourse.julialang.org/u/james_p_d)\
**Replies:** 2\
**Last updated:** [July 17, 2020, 1:13am UTC](https://discourse.julialang.org/t/calling-julia-from-python-on-thread/43187 "2020-07-17T01:13:39Z")

</div>

I’ve been playing around with calling Julia functions from Python which has all worked fine until I try and call from a thread. To illustrate, here is a short example: Julia code: function add(x, y) return x + y en…

---

## [Is pmap type stable?](https://discourse.julialang.org/t/is-pmap-type-stable/25450)

<div class="topic-metadata">

**Author:** [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Replies:** 1\
**Last updated:** [July 16, 2020, 9:57pm UTC](https://discourse.julialang.org/t/is-pmap-type-stable/25450 "2020-07-16T21:57:03Z")

</div>

Using @code\_warntype on pmap, this is reported as type unstable, is this true ? Is there a way to make it type stable ? julia\> using Distributed, BenchmarkTools julia\> a = rand(1:35,100) # Int64\[100\] julia\> addprocs(3)…

---

## [Confusion about optimizations in @code\_typed](https://discourse.julialang.org/t/confusion-about-optimizations-in-code-typed/43197)

<div class="topic-metadata">

**Author:** [@xitology](https://discourse.julialang.org/u/xitology)\
**Replies:** 0\
**Last updated:** [July 16, 2020, 8:52pm UTC](https://discourse.julialang.org/t/confusion-about-optimizations-in-code-typed/43197 "2020-07-16T20:52:39Z")

</div>

I’m trying to learn how to optimize Julia code, and at some point I discovered I don’t understand the behavior of @code\_typed. I defined a simple recursive Fibonacci function: julia\> fib(n) = n \<= 1 ? n : fib(n-1) + fi…

---

## [Help JuMP: we want to hear from people using JuMP to drive impactful changes to their business](https://discourse.julialang.org/t/help-jump-we-want-to-hear-from-people-using-jump-to-drive-impactful-changes-to-their-business/43191)

<div class="topic-metadata">

**Author:** [@odow](https://discourse.julialang.org/u/odow)\
**Replies:** 0\
**Last updated:** [July 16, 2020, 7:15pm UTC](https://discourse.julialang.org/t/help-jump-we-want-to-hear-from-people-using-jump-to-drive-impactful-changes-to-their-business/43191 "2020-07-16T19:15:28Z")

</div>

Dear all, JuMP is in the running for an award and we need your help. Have you used JuMP (either prototyping, or in deployment) to drive impactful changes to your business or organization? If so, would you be interest…

---

## [BenchmarkTools](https://discourse.julialang.org/t/benchmarktools/43177)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 6\
**Last updated:** [July 16, 2020, 5:03pm UTC](https://discourse.julialang.org/t/benchmarktools/43177 "2020-07-16T17:03:50Z")

</div>

I am trying to use BenchmarkTools in the properway. Consider the following, executed in the REPL: using BenchmarkTools BenchmarkTools.DEFAULT\_PARAMETERS.samples = 1 BenchmarkTools.DEFAULT\_PARAMETERS.evals = 1 #Benchmar…

---

## [Provide a specific argument to a specific function from a series of functions from command line](https://discourse.julialang.org/t/provide-a-specific-argument-to-a-specific-function-from-a-series-of-functions-from-command-line/33777)

<div class="topic-metadata">

**Author:** [@flalom](https://discourse.julialang.org/u/flalom)\
**Replies:** 7\
**Last updated:** [July 16, 2020, 4:41pm UTC](https://discourse.julialang.org/t/provide-a-specific-argument-to-a-specific-function-from-a-series-of-functions-from-command-line/33777 "2020-07-16T16:41:32Z")

</div>

Hello everybody. I would like to ask you: how to enter the argument(s) for only one specific function of the many ones I have in my script file from command line? In more details: I am working on a training file, where…

---

## [What does \[\] mean in this case?](https://discourse.julialang.org/t/what-does-mean-in-this-case/43175)

<div class="topic-metadata">

**Author:** [@pauljurczak](https://discourse.julialang.org/u/pauljurczak)\
**Replies:** 14\
**Last updated:** [July 16, 2020, 4:34pm UTC](https://discourse.julialang.org/t/what-does-mean-in-this-case/43175 "2020-07-16T16:34:09Z")

</div>

I’m trying to figure out a functionality of Makie.jl, which I can’t find in documentation. In the process, I noticed a syntax I don’t understand: julia\> s = Scene() julia\> fieldnames(Scene) (:parent, :events, :px\_area,…

---

## [Issue with Array of user-defined type](https://discourse.julialang.org/t/issue-with-array-of-user-defined-type/43166)

<div class="topic-metadata">

**Author:** [@mleprovost](https://discourse.julialang.org/u/mleprovost)\
**Replies:** 4\
**Last updated:** [July 16, 2020, 3:50pm UTC](https://discourse.julialang.org/t/issue-with-array-of-user-defined-type/43166 "2020-07-16T15:50:05Z")

</div>

Hello, I would like to create a parametric struct Basis that holds a vector of a user-defined type ParamFcn. I define the functions getindex and setindex! for the struct Basis but the command @warn\_type that the the typ…

---

## [any(f::Function, a::AbstractArray; dims)](https://discourse.julialang.org/t/any-f-function-a-abstractarray-dims/42607)

<div class="topic-metadata">

**Author:** [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)\
**Replies:** 9\
**Last updated:** [July 16, 2020, 3:18pm UTC](https://discourse.julialang.org/t/any-f-function-a-abstractarray-dims/42607 "2020-07-16T15:18:10Z")

</div>

is defined (reducedim.jl:729, Julia 1.5.0-rc1.0), but not documented. Also, its behaviour is slightly different from any(a;dims), For instance, any(\[1 2\].\>0,dims=2) gives a BitArray, while any(i-\>i\>0,\[1 2\],dims=2) give…

---

## [Pyjulia - accessing data in a Julia Dataframe that was called from Python](https://discourse.julialang.org/t/pyjulia-accessing-data-in-a-julia-dataframe-that-was-called-from-python/32082)

<div class="topic-metadata">

**Author:** [@00krishna](https://discourse.julialang.org/u/00krishna)\
**Replies:** 5\
**Last updated:** [July 16, 2020, 2:20pm UTC](https://discourse.julialang.org/t/pyjulia-accessing-data-in-a-julia-dataframe-that-was-called-from-python/32082 "2020-07-16T14:20:26Z")

</div>

I had a bunch of help from @stevengj to solve this problem of calling Julia from python. So that was great. I can now write a function in Julia that generates a Dataframe and call that back into python. But I was not sur…

---

## [ArgumentError: array must be non-empty while calling Serialization.deserialize(f) function](https://discourse.julialang.org/t/argumenterror-array-must-be-non-empty-while-calling-serialization-deserialize-f-function/28508)

<div class="topic-metadata">

**Author:** [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Replies:** 1\
**Last updated:** [July 16, 2020, 2:17pm UTC](https://discourse.julialang.org/t/argumenterror-array-must-be-non-empty-while-calling-serialization-deserialize-f-function/28508 "2020-07-16T14:17:30Z")

</div>

The following is the code: if use\_cache && isfile(cachefile) f = open(cachefile, "r") res = Serialization.deserialize(f) close(f); end Then, I got an error, saying that “ArgumentError: array must be non-…

---

## [Help understanding MOI bridges, Even Proof-of-concept doesn't work](https://discourse.julialang.org/t/help-understanding-moi-bridges-even-proof-of-concept-doesnt-work/43152)

<div class="topic-metadata">

**Author:** [@votroto](https://discourse.julialang.org/u/votroto)\
**Replies:** 3\
**Last updated:** [July 16, 2020, 1:52pm UTC](https://discourse.julialang.org/t/help-understanding-moi-bridges-even-proof-of-concept-doesnt-work/43152 "2020-07-16T13:52:26Z")

</div>

Hi, I’ve been playing around with MOI bridges, but I can’t get even the simplest thing to work. Let’s imagine I want to create a bridge that simply ignores any PSD constraints: module MWE using MathOptInterface const M…

---

## [Locally solved](https://discourse.julialang.org/t/locally-solved/43179)

<div class="topic-metadata">

**Author:** [@mayar](https://discourse.julialang.org/u/mayar)\
**Replies:** 2\
**Last updated:** [July 16, 2020, 1:49pm UTC](https://discourse.julialang.org/t/locally-solved/43179 "2020-07-16T13:49:10Z")

</div>

hello there, I have used Ipopt with JuMP to solve an NLP problem and I got locally solved as a termination status…I tried changing the starting point but the results never changed What can I do to get an Optimal Soluti…

---

## [Plotting weighted graphs](https://discourse.julialang.org/t/plotting-weighted-graphs/43127)

<div class="topic-metadata">

**Author:** [@ohmsweetohm1](https://discourse.julialang.org/u/ohmsweetohm1)\
**Replies:** 3\
**Last updated:** [July 16, 2020, 12:14pm UTC](https://discourse.julialang.org/t/plotting-weighted-graphs/43127 "2020-07-16T12:14:45Z")

</div>

Is it possible to plot a SimpleWeightedGraphs.SimpleWeightedDiGraph? Using GraphPlot I get an error.

---

## [Debugging forced package downgrade](https://discourse.julialang.org/t/debugging-forced-package-downgrade/43172)

<div class="topic-metadata">

**Author:** [@tlienart](https://discourse.julialang.org/u/tlienart)\
**Replies:** 2\
**Last updated:** [July 16, 2020, 11:41am UTC](https://discourse.julialang.org/t/debugging-forced-package-downgrade/43172 "2020-07-16T11:41:54Z")

</div>

This happens occasionally: I have an env with 10-20 deps, one of the package’s latest version is 0.x.4 and I currently have 0.x.1; doing up doesn’t change anything. Forcing with add thePackage@0.x.4 leads to ├─possible…

---

## [Type checking in Dictionaries](https://discourse.julialang.org/t/type-checking-in-dictionaries/43156)

<div class="topic-metadata">

**Author:** [@hdavid16](https://discourse.julialang.org/u/hdavid16)\
**Replies:** 7\
**Last updated:** [July 16, 2020, 10:43am UTC](https://discourse.julialang.org/t/type-checking-in-dictionaries/43156 "2020-07-16T10:43:31Z")

</div>

The Julia style guide says, For example, don’t declare an argument to be of type Int or Int32 if it really could be any integer, expressed with the abstract type Integer (Numbers · The Julia Language) However,…

---

## [Need help with Implementing a simple planner in Julia in the context of the blocks world](https://discourse.julialang.org/t/need-help-with-implementing-a-simple-planner-in-julia-in-the-context-of-the-blocks-world/42928)

<div class="topic-metadata">

**Author:** [@Moreno](https://discourse.julialang.org/u/Moreno)\
**Replies:** 17\
**Last updated:** [July 16, 2020, 10:25am UTC](https://discourse.julialang.org/t/need-help-with-implementing-a-simple-planner-in-julia-in-the-context-of-the-blocks-world/42928 "2020-07-16T10:25:02Z")

</div>

Consider a collection of blocks and several tables. A block A can be in the box or on one of the tables at a given time. While on a table, a block A can be on the surface of the table or on top of another block B. The …

---

## [Capture part of return type](https://discourse.julialang.org/t/capture-part-of-return-type/43139)

<div class="topic-metadata">

**Author:** [@grahamas](https://discourse.julialang.org/u/grahamas)\
**Replies:** 4\
**Last updated:** [July 16, 2020, 10:08am UTC](https://discourse.julialang.org/t/capture-part-of-return-type/43139 "2020-07-16T10:08:41Z")

</div>

Is there a way to capture the type of a return in a variable (specifically a parameter of the variable type, but baby steps) function f() A::AbstractArray{T} where T = \[1.0 2.0\] return T end Of course I can pre…

---

## [Package compatibility with language versions](https://discourse.julialang.org/t/package-compatibility-with-language-versions/43108)

<div class="topic-metadata">

**Author:** [@pengwyn](https://discourse.julialang.org/u/pengwyn)\
**Replies:** 7\
**Last updated:** [July 16, 2020, 9:05am UTC](https://discourse.julialang.org/t/package-compatibility-with-language-versions/43108 "2020-07-16T09:05:24Z")

</div>

I’m looking for opinions about what is the best practice in dealing with differences in Julia language versions, e.g. between v1.0 and v1.4 with packages. Should packages stick with v1.0 compatibility as much as possible…

---

## [Drop incomplete groups from a DataFrame](https://discourse.julialang.org/t/drop-incomplete-groups-from-a-dataframe/43131)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 5\
**Last updated:** [July 16, 2020, 8:48am UTC](https://discourse.julialang.org/t/drop-incomplete-groups-from-a-dataframe/43131 "2020-07-16T08:48:16Z")

</div>

After removing some rows from a dataframe, I would like to keep only groups (grouping on a variable) which have “complete” observations (households always have 2 members in this data in the dataset I start with, so for …

---

## [When is threading going from experimental to production ready?](https://discourse.julialang.org/t/when-is-threading-going-from-experimental-to-production-ready/43167)

<div class="topic-metadata">

**Author:** [@Impressium](https://discourse.julialang.org/u/Impressium)\
**Replies:** 1\
**Last updated:** [July 16, 2020, 7:52am UTC](https://discourse.julialang.org/t/when-is-threading-going-from-experimental-to-production-ready/43167 "2020-07-16T07:52:49Z")

</div>

What does it mean, that threading is experimental and when does it be ready for production?

---

## [Type check Array vs UnitRange inside a struct](https://discourse.julialang.org/t/type-check-array-vs-unitrange-inside-a-struct/43154)

<div class="topic-metadata">

**Author:** [@hdavid16](https://discourse.julialang.org/u/hdavid16)\
**Replies:** 1\
**Last updated:** [July 16, 2020, 3:45am UTC](https://discourse.julialang.org/t/type-check-array-vs-unitrange-inside-a-struct/43154 "2020-07-16T03:45:54Z")

</div>

Type checking seems to be off within structs when it comes to Arrays and UnitRanges. Defining a function with an argument that is of type Array forbids supplying a UnitRange as an input. However, when a struct is defined…

---

## [DifferentialEquations.jl and systems with heterogenous units](https://discourse.julialang.org/t/differentialequations-jl-and-systems-with-heterogenous-units/2952)

<div class="topic-metadata">

**Author:** [@helgee](https://discourse.julialang.org/u/helgee)\
**Replies:** 17\
**Last updated:** [July 16, 2020, 1:31am UTC](https://discourse.julialang.org/t/differentialequations-jl-and-systems-with-heterogenous-units/2952 "2020-07-16T01:31:08Z")

</div>

Hi everybody, I am trying to solve the following system of ODE with DifferentialEquations.jl function newton!(t, y, dy, μ) r = norm(y\[1:3\]) dy\[1:3\] = y\[4:6\] dy\[4:6\] = -μ \* y\[1:3\] / r^3 end Without units th…

---

## [What is a Julian approach to data structures for a simulation package?](https://discourse.julialang.org/t/what-is-a-julian-approach-to-data-structures-for-a-simulation-package/43093)

<div class="topic-metadata">

**Author:** [@mmtn](https://discourse.julialang.org/u/mmtn)\
**Replies:** 2\
**Last updated:** [July 16, 2020, 12:59am UTC](https://discourse.julialang.org/t/what-is-a-julian-approach-to-data-structures-for-a-simulation-package/43093 "2020-07-16T00:59:14Z")

</div>

I’m working on my first major Julia project which is a physics simulation package. The overall goal is to develop this package to be as neat, efficient, and extensible as possible using good Julian code conventions so pe…

---

## [PyCall installation problems](https://discourse.julialang.org/t/pycall-installation-problems/33832)

<div class="topic-metadata">

**Author:** [@kumarbalachandran](https://discourse.julialang.org/u/kumarbalachandran)\
**Replies:** 7\
**Last updated:** [July 16, 2020, 12:06am UTC](https://discourse.julialang.org/t/pycall-installation-problems/33832 "2020-07-16T00:06:33Z")

</div>

Hi all, I posted the problem in the PyCall page but it really belongs here. Please look at Error building PyCall · Issue #742 · JuliaPy/PyCall.jl · GitHub where I have a problem installing PyCall. I would appreciate an…

---

## [JuMP.all\_constraints not listing GenericQuadExpr constraints](https://discourse.julialang.org/t/jump-all-constraints-not-listing-genericquadexpr-constraints/43103)

<div class="topic-metadata">

**Author:** [@adow031](https://discourse.julialang.org/u/adow031)\
**Replies:** 8\
**Last updated:** [July 15, 2020, 11:16pm UTC](https://discourse.julialang.org/t/jump-all-constraints-not-listing-genericquadexpr-constraints/43103 "2020-07-15T23:16:35Z")

</div>

I have a quadratic program, and was trying to list all the constraints. However, all\_constraints, wouldn’t list any of the constraints of type GenericQuadExpr. Below is a small example exhibiting the problem. m = Model(…

---

## [Summary statistics for arbitrary variables within Turing model](https://discourse.julialang.org/t/summary-statistics-for-arbitrary-variables-within-turing-model/43120)

<div class="topic-metadata">

**Author:** [@balaji1975](https://discourse.julialang.org/u/balaji1975)\
**Replies:** 2\
**Last updated:** [July 15, 2020, 10:30pm UTC](https://discourse.julialang.org/t/summary-statistics-for-arbitrary-variables-within-turing-model/43120 "2020-07-15T22:30:38Z")

</div>

Hi - Is there a way to get summary stats on theta defined in the model below? @model schools(y, s) = begin N = length(y) eta = Array{Float64}(undef, N) theta = Array{Float64}(undef, N) mu ~ Uniform(-100, 100) tau…

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

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