# Latest

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

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

**Page:** 1339

---

## [The Hegemony Of \`==\` Must End; Welcome The \`⩵\` Upstart](https://discourse.julialang.org/t/the-hegemony-of-must-end-welcome-the-upstart/63605)

<div class="topic-metadata">

**Author:** [@blackeneth](https://discourse.julialang.org/u/blackeneth)\
**Replies:** 46\
**Last updated:** [July 7, 2021, 7:31am UTC](https://discourse.julialang.org/t/the-hegemony-of-must-end-welcome-the-upstart/63605 "2021-07-07T07:31:37Z")

</div>

A lot of discussion took place with My Brain Is Hard-Wired Against ==; Help Me, Julia, I thought I would post my response as one monolithic post. The Proposal Create a Unicode character alias for the relational operato…

---

## [Dynamically setting the constraint sense in JuMP](https://discourse.julialang.org/t/dynamically-setting-the-constraint-sense-in-jump/64155)

<div class="topic-metadata">

**Author:** [@Mastomaki](https://discourse.julialang.org/u/Mastomaki)\
**Replies:** 2\
**Last updated:** [July 7, 2021, 7:14am UTC](https://discourse.julialang.org/t/dynamically-setting-the-constraint-sense-in-jump/64155 "2021-07-07T07:14:28Z")

</div>

Hello! I was wondering if it is possible to specify different types (i.e. \<=, == and \>=) constraints within the same JuMP container. For example @constraint(model, con\[i = 1:3\], i \* x \<= i + 1) So that whether \<=, == …

---

## [User defined logger behaviour](https://discourse.julialang.org/t/user-defined-logger-behaviour/63367)

<div class="topic-metadata">

**Author:** [@Jan\_Dolinsky](https://discourse.julialang.org/u/Jan_Dolinsky)\
**Replies:** 4\
**Last updated:** [July 7, 2021, 7:11am UTC](https://discourse.julialang.org/t/user-defined-logger-behaviour/63367 "2021-07-07T07:11:13Z")

</div>

Hello, I read on how logging in Julia works at: Logging · The Julia Language . Great stuff, good to see the split in the overall design between creating events and processing them by means of defining a logger. I am in…

---

## [How to achieve the expected graph?](https://discourse.julialang.org/t/how-to-achieve-the-expected-graph/64195)

<div class="topic-metadata">

**Author:** [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Replies:** 1\
**Last updated:** [July 7, 2021, 6:48am UTC](https://discourse.julialang.org/t/how-to-achieve-the-expected-graph/64195 "2021-07-07T06:48:23Z")

</div>

I try to reproduce the example of the following link: Example: The Polynomials.jl logo, but I don’t get the image shown in the link: I only get the following image #https://juliamath.github.io/Polynomials.jl/stabl…

---

## [Flux: How to create a custom multi-layer model with some parameters shared across layers?](https://discourse.julialang.org/t/flux-how-to-create-a-custom-multi-layer-model-with-some-parameters-shared-across-layers/64190)

<div class="topic-metadata">

**Author:** [@IRM](https://discourse.julialang.org/u/IRM)\
**Replies:** 2\
**Last updated:** [July 7, 2021, 4:39am UTC](https://discourse.julialang.org/t/flux-how-to-create-a-custom-multi-layer-model-with-some-parameters-shared-across-layers/64190 "2021-07-07T04:39:40Z")

</div>

Hi all, I’m somewhat new to Julia and Flux, and trying to train a model similar to a standard dense multi-layer neural network, but with sharing of some trainable parameters between layers. To give a concrete example (…

---

## [Accessing a specific layer's weights in a Flux Chain](https://discourse.julialang.org/t/accessing-a-specific-layers-weights-in-a-flux-chain/64180)

<div class="topic-metadata">

**Author:** [@bad\_at\_math](https://discourse.julialang.org/u/bad_at_math)\
**Replies:** 1\
**Last updated:** [July 7, 2021, 1:15am UTC](https://discourse.julialang.org/t/accessing-a-specific-layers-weights-in-a-flux-chain/64180 "2021-07-07T01:15:44Z")

</div>

In PyTorch, I can define a network like this: from torch import nn class Network(nn.Module): def \_\_init\_\_(self, ...): ... self.ln\_1 = nn.Linear(64, 32) self.ln\_2 = nn.Linear(32, 16) …

---

## [Plots circle in 3D space](https://discourse.julialang.org/t/plots-circle-in-3d-space/64121)

<div class="topic-metadata">

**Author:** [@iHany](https://discourse.julialang.org/u/iHany)\
**Replies:** 2\
**Last updated:** [July 7, 2021, 12:49am UTC](https://discourse.julialang.org/t/plots-circle-in-3d-space/64121 "2021-07-07T00:49:24Z")

</div>

Hi, I’m trying to draw a circle in 3D space. Example code is: using Plots using LinearAlgebra using Transducers function \_test() fig = plot() p = zeros(3) l = 0.3 body\_U = \[0, 0, 1\] plot!(fig, c…

---

## [Compiler optimizations on integer exponentation](https://discourse.julialang.org/t/compiler-optimizations-on-integer-exponentation/64185)

<div class="topic-metadata">

**Author:** [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Replies:** 3\
**Last updated:** [July 7, 2021, 12:48am UTC](https://discourse.julialang.org/t/compiler-optimizations-on-integer-exponentation/64185 "2021-07-07T00:48:29Z")

</div>

The following code contains two functions that compute Lennard-Jones potentials, U(r) = 4\\varepsilon \\left(\\frac{\\sigma^{12}}{r^{12}} - \\frac{\\sigma^6}{r^6}\\right) for all pairs of a set of 1000 particles. The first fun…

---

## [Error while formatting a specific number!](https://discourse.julialang.org/t/error-while-formatting-a-specific-number/64172)

<div class="topic-metadata">

**Author:** [@esmith289](https://discourse.julialang.org/u/esmith289)\
**Replies:** 4\
**Last updated:** [July 6, 2021, 11:03pm UTC](https://discourse.julialang.org/t/error-while-formatting-a-specific-number/64172 "2021-07-06T23:03:49Z")

</div>

This seems total crazy to me: so in the REPL I write: julia\> using Formatting julia\> ff= string(“{:.e”,4,“E”,“}”} “{:.4e}” Then I use ff to format a number like: julia\> zz = Formatting.format(ff,1E-8) “1.0000e-08”…

---

## [Strange inclusive range issue](https://discourse.julialang.org/t/strange-inclusive-range-issue/64175)

<div class="topic-metadata">

**Author:** [@Ribeiro](https://discourse.julialang.org/u/Ribeiro)\
**Replies:** 7\
**Last updated:** [July 6, 2021, 10:40pm UTC](https://discourse.julialang.org/t/strange-inclusive-range-issue/64175 "2021-07-06T22:40:31Z")

</div>

Hi, folks. Bumped into this today and it forced me to switch do degrees. (0:(2π/101):2π)\[end\] # 6.283185307179586 (0:(2π/102):2π)\[end\] # 6.283185307179586 (0:(2π/100):2π)\[end\]# 6.220353454107791 Note that the last res…

---

## [Does Julia have a native \`expect\` package?](https://discourse.julialang.org/t/does-julia-have-a-native-expect-package/64171)

<div class="topic-metadata">

**Author:** [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Replies:** 3\
**Last updated:** [July 6, 2021, 9:54pm UTC](https://discourse.julialang.org/t/does-julia-have-a-native-expect-package/64171 "2021-07-06T21:54:52Z")

</div>

Python, Rust, and others have pseudo-terminal functionality via expect. Has a Julia package been developed for this purpose yet?

---

## [Performance overhead observed variables ModelingToolkit](https://discourse.julialang.org/t/performance-overhead-observed-variables-modelingtoolkit/64164)

<div class="topic-metadata">

**Author:** [@Elmo](https://discourse.julialang.org/u/Elmo)\
**Replies:** 1\
**Last updated:** [July 6, 2021, 9:43pm UTC](https://discourse.julialang.org/t/performance-overhead-observed-variables-modelingtoolkit/64164 "2021-07-06T21:43:51Z")

</div>

Hi all, I am using ModelingToolkit to simulate a system and noticed that there seems to be a serious performance cost associated with using the nice observed variables functionality of ModelingToolkit. Here is a minimal …

---

## [Memory Allocation JuMP constraint!](https://discourse.julialang.org/t/memory-allocation-jump-constraint/64137)

<div class="topic-metadata">

**Author:** [@musman](https://discourse.julialang.org/u/musman)\
**Replies:** 1\
**Last updated:** [July 6, 2021, 9:25pm UTC](https://discourse.julialang.org/t/memory-allocation-jump-constraint/64137 "2021-07-06T21:25:42Z")

</div>

Hi all, I am implementing the following constraint which is allocating around 27MB of memory. for i in 1:nLines f\_bus = nw\_lines\[i\].line\_from t\_bus = nw\_lines\[i\].line\_to idx\_t\_bus = findall(x-\>x==t\_…

---

## [ODE solver fails with ForwardDiff, but works with central differences for first derivative of an input function](https://discourse.julialang.org/t/ode-solver-fails-with-forwarddiff-but-works-with-central-differences-for-first-derivative-of-an-input-function/63033)

<div class="topic-metadata">

**Author:** [@TS-CUBED](https://discourse.julialang.org/u/TS-CUBED)\
**Replies:** 10\
**Last updated:** [July 6, 2021, 9:17pm UTC](https://discourse.julialang.org/t/ode-solver-fails-with-forwarddiff-but-works-with-central-differences-for-first-derivative-of-an-input-function/63033 "2021-07-06T21:17:35Z")

</div>

I am modelling the human cardiovascular system and solve equations similar to the windkessel equation in the example: # The 5-element WK formulation, also 4-element parallel for Ls = 0.0 function wk5(dP,…

---

## [Numeric Taylor expansion](https://discourse.julialang.org/t/numeric-taylor-expansion/64162)

<div class="topic-metadata">

**Author:** [@feanor12](https://discourse.julialang.org/u/feanor12)\
**Replies:** 2\
**Last updated:** [July 6, 2021, 9:00pm UTC](https://discourse.julialang.org/t/numeric-taylor-expansion/64162 "2021-07-06T21:00:37Z")

</div>

I have the problem that a certain software only handles polynomials as input data and I have some experimental data/non polynomial solutions, which I would like to convert. Is there a package that can do a Taylor expans…

---

## [On Julia interoperability with C and PyCall](https://discourse.julialang.org/t/on-julia-interoperability-with-c-and-pycall/64013)

<div class="topic-metadata">

**Author:** [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Replies:** 8\
**Last updated:** [July 6, 2021, 6:19pm UTC](https://discourse.julialang.org/t/on-julia-interoperability-with-c-and-pycall/64013 "2021-07-06T18:19:28Z")

</div>

Hi. I wanted to try Julia for some time, but since now it starts having more of a reason for me, some questions popped up. why Julia native instead of C libraries ? The problem with python was that it was slow. The s…

---

## [The 2021 Julia language survey has completed](https://discourse.julialang.org/t/the-2021-julia-language-survey-has-completed/62641)

<div class="topic-metadata">

**Author:** [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Replies:** 26\
**Last updated:** [July 6, 2021, 7:33pm UTC](https://discourse.julialang.org/t/the-2021-julia-language-survey-has-completed/62641 "2021-07-06T19:33:23Z")

</div>

Julia users and developers are invited to complete the annual Julia User & Developer Survey. Click here to respond — make your voice heard and be counted as part of the Julia community. The survey is available in English,…

---

## [Turing model that records objective function values](https://discourse.julialang.org/t/turing-model-that-records-objective-function-values/64167)

<div class="topic-metadata">

**Author:** [@pthompson234](https://discourse.julialang.org/u/pthompson234)\
**Replies:** 0\
**Last updated:** [July 6, 2021, 6:22pm UTC](https://discourse.julialang.org/t/turing-model-that-records-objective-function-values/64167 "2021-07-06T18:22:17Z")

</div>

Hi, this might be a bit of a silly question but I’m using Turing to run a Bayesian MCMC algorithm. I’m using a distribution I made up as the distribution of my response variable and I would like the chain object to store…

---

## [Find neighbored segments/labels in Matrix](https://discourse.julialang.org/t/find-neighbored-segments-labels-in-matrix/64151)

<div class="topic-metadata">

**Author:** [@Bjorn\_De](https://discourse.julialang.org/u/Bjorn_De)\
**Replies:** 7\
**Last updated:** [July 6, 2021, 6:18pm UTC](https://discourse.julialang.org/t/find-neighbored-segments-labels-in-matrix/64151 "2021-07-06T18:18:18Z")

</div>

Hi all! I have applied a segmentation on an array and want to find the neighbors of each segment. For example: Input: 4×6 Matrix{Int64}: 1 1 1 2 2 2 1 1 5 5 4 4 7 7 3 3 3 3 9 9 9 9 8 8 Output: Dic…

---

## [IntervalOptimisation surprising result](https://discourse.julialang.org/t/intervaloptimisation-surprising-result/64144)

<div class="topic-metadata">

**Author:** [@gmouts](https://discourse.julialang.org/u/gmouts)\
**Replies:** 9\
**Last updated:** [July 6, 2021, 6:11pm UTC](https://discourse.julialang.org/t/intervaloptimisation-surprising-result/64144 "2021-07-06T18:11:08Z")

</div>

I need to find the maximiser and the maximum of functions that have a narrow bump. I had some issues with numerics, so I decided to try my luck with intervals. Here is a minimal working (?) example: using IntervalArith…

---

## [@autodocs methodswith(MyType) using Documenter](https://discourse.julialang.org/t/autodocs-methodswith-mytype-using-documenter/63873)

<div class="topic-metadata">

**Author:** [@RaulDurand](https://discourse.julialang.org/u/RaulDurand)\
**Replies:** 2\
**Last updated:** [July 6, 2021, 5:16pm UTC](https://discourse.julialang.org/t/autodocs-methodswith-mytype-using-documenter/63873 "2021-07-06T17:16:09Z")

</div>

Hi! Is there a way to automatically document all the methods related to a type? Something similar to @autodocs Mudule=MyModule but for all methods with my Type.

---

## [Starting GLMakie takes very long](https://discourse.julialang.org/t/starting-glmakie-takes-very-long/64106)

<div class="topic-metadata">

**Author:** [@peteole](https://discourse.julialang.org/u/peteole)\
**Replies:** 28\
**Last updated:** [July 6, 2021, 4:50pm UTC](https://discourse.julialang.org/t/starting-glmakie-takes-very-long/64106 "2021-07-06T16:50:22Z")

</div>

Hi, I am getting started with Makie. The functionality is cool. However I am really annoyed by the startup time: It takes over a minute to open the first plot in GLMakie. After that plotting works instantly, but the st…

---

## [Use of \`Ref\` in broadcasting user-defined functions](https://discourse.julialang.org/t/use-of-ref-in-broadcasting-user-defined-functions/64154)

<div class="topic-metadata">

**Author:** [@drarnau](https://discourse.julialang.org/u/drarnau)\
**Replies:** 2\
**Last updated:** [July 6, 2021, 4:23pm UTC](https://discourse.julialang.org/t/use-of-ref-in-broadcasting-user-defined-functions/64154 "2021-07-06T16:23:46Z")

</div>

Hello, I would like to apply a function that I’ve created to an array/range. Let me use a simplified version of my code to illustrate my question. It starts defining a structure for parameters, something like: using Pa…

---

## [Discussing products](https://discourse.julialang.org/t/discussing-products/64063)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 3\
**Last updated:** [July 6, 2021, 3:59pm UTC](https://discourse.julialang.org/t/discussing-products/64063 "2021-07-06T15:59:18Z")

</div>

I have recently contributed to a thread on big data. I work as a Principal HPC Engineer at Dell. We work with leading edge technologies and some very interesting projects all over the world. I promote projects which we…

---

## [Julia slowdown on long running programs with many allocations](https://discourse.julialang.org/t/julia-slowdown-on-long-running-programs-with-many-allocations/63516)

<div class="topic-metadata">

**Author:** [@scottjordan](https://discourse.julialang.org/u/scottjordan)\
**Replies:** 6\
**Last updated:** [July 6, 2021, 2:22pm UTC](https://discourse.julialang.org/t/julia-slowdown-on-long-running-programs-with-many-allocations/63516 "2021-07-06T14:22:24Z")

</div>

Currently, I am benchmarking flux code compared to python code for different configurations of data and network sizes. However, I noticed that execution slows as more models have been trained with different configuration…

---

## [Memory allocation problem with Optim + ApproxFun](https://discourse.julialang.org/t/memory-allocation-problem-with-optim-approxfun/64084)

<div class="topic-metadata">

**Author:** [@dbennett1994](https://discourse.julialang.org/u/dbennett1994)\
**Replies:** 8\
**Last updated:** [July 6, 2021, 2:06pm UTC](https://discourse.julialang.org/t/memory-allocation-problem-with-optim-approxfun/64084 "2021-07-06T14:06:09Z")

</div>

Hi all. I’m quite new to Julia and this is my first post. I want to optimize a functional F\[\\phi\] = \\int\_0^1 \\left\[\\frac{1}{2}\\left(\\partial\_x \\phi\\right)^2 + V(x,\\phi(x))\\right\]\\text{d}x. Of course, this can be done by…

---

## [Reseting Device](https://discourse.julialang.org/t/reseting-device/63997)

<div class="topic-metadata">

**Author:** [@Fabrice\_Rosay](https://discourse.julialang.org/u/Fabrice_Rosay)\
**Replies:** 20\
**Last updated:** [July 6, 2021, 12:30pm UTC](https://discourse.julialang.org/t/reseting-device/63997 "2021-07-06T12:30:33Z")

</div>

Is there any way to reset device state, or at least wipe memory allocated, but keeping already compiled kernel ? I keep seeing slow down during iterated call to CUDA and those disapear if i stop and rerun the execution.…

---

## [Plotting a cumulative frequency line on a histogram with second y axis](https://discourse.julialang.org/t/plotting-a-cumulative-frequency-line-on-a-histogram-with-second-y-axis/63675)

<div class="topic-metadata">

**Author:** [@leejm516](https://discourse.julialang.org/u/leejm516)\
**Replies:** 4\
**Last updated:** [July 6, 2021, 11:46am UTC](https://discourse.julialang.org/t/plotting-a-cumulative-frequency-line-on-a-histogram-with-second-y-axis/63675 "2021-07-06T11:46:31Z")

</div>

Dear all: I am struggling with plotting a histogram with a cumulative frequency line overlaid. I want to use twinx() to display the second y axis, but my code does not work. using Plots # some doing for data scores =…

---

## [Workspace doesn't display UInt values](https://discourse.julialang.org/t/workspace-doesnt-display-uint-values/64073)

<div class="topic-metadata">

**Author:** [@jpmorr](https://discourse.julialang.org/u/jpmorr)\
**Replies:** 11\
**Last updated:** [July 6, 2021, 11:31am UTC](https://discourse.julialang.org/t/workspace-doesnt-display-uint-values/64073 "2021-07-06T11:31:45Z")

</div>

I’ve just started using Julia and I wanted something nice to start working in, so I’ve downloaded and installed JuliaPro. All good. But I’ve just noticed something that’s annoying me lots and I don’t know if it can be fi…

---

## [Memory usage data for getproperty function](https://discourse.julialang.org/t/memory-usage-data-for-getproperty-function/64139)

<div class="topic-metadata">

**Author:** [@jsjie](https://discourse.julialang.org/u/jsjie)\
**Replies:** 3\
**Last updated:** [July 6, 2021, 10:56am UTC](https://discourse.julialang.org/t/memory-usage-data-for-getproperty-function/64139 "2021-07-06T10:56:09Z")

</div>

I’m analysing memory usage as described in julia manual , and I found that getproperty functions seem to be related to large numbers. The following lines is taken from the result .mem file: - function Base.getp…

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

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