# Latest

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

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

**Page:** 1317

---

## [Julia inner type-inference working](https://discourse.julialang.org/t/julia-inner-type-inference-working/65521)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 2\
**Last updated:** [July 29, 2021, 8:17pm UTC](https://discourse.julialang.org/t/julia-inner-type-inference-working/65521 "2021-07-29T20:17:59Z")

</div>

Hi all, I run over a very surprising type-inference difference. I always thought these two codes would be regarded identical to Julia’s compiler. make\_sigtype\_without\_bits(::Type{T}) where T\<:Tuple = Tuple{\_make\_sigtyp…

---

## [Inner product of functions on an interval with Trapz.jl](https://discourse.julialang.org/t/inner-product-of-functions-on-an-interval-with-trapz-jl/65505)

<div class="topic-metadata">

**Author:** [@thompsonmj](https://discourse.julialang.org/u/thompsonmj)\
**Replies:** 3\
**Last updated:** [July 29, 2021, 7:49pm UTC](https://discourse.julialang.org/t/inner-product-of-functions-on-an-interval-with-trapz-jl/65505 "2021-07-29T19:49:19Z")

</div>

x = range(0.,π,length = 1000) u1 = sin.(x) u2 = cos.(x) ip = trapz(x,prod(hcat(u1,u2),dims=2)) AssertionError: Integration axis over yis incompatible withx. Make sure their length match! Can’t figure out why it’s not c…

---

## [How to remove overhead due to nested optimization with Optim package](https://discourse.julialang.org/t/how-to-remove-overhead-due-to-nested-optimization-with-optim-package/65439)

<div class="topic-metadata">

**Author:** [@Joris\_Pinkse](https://discourse.julialang.org/u/Joris_Pinkse)\
**Replies:** 7\
**Last updated:** [July 29, 2021, 7:36pm UTC](https://discourse.julialang.org/t/how-to-remove-overhead-due-to-nested-optimization-with-optim-package/65439 "2021-07-29T19:36:52Z")

</div>

Consider minimizing f(x, y1, y2) using a nested procedure. In an inner loop y1, y2 are minimized as a function of x and in the outer loop f( x, y1(x), y2(x) ) is minimized where y1(x), y2(x) are the solutions to the inn…

---

## [Efficient maximum of a large matrix](https://discourse.julialang.org/t/efficient-maximum-of-a-large-matrix/65512)

<div class="topic-metadata">

**Author:** [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Replies:** 3\
**Last updated:** [July 29, 2021, 7:35pm UTC](https://discourse.julialang.org/t/efficient-maximum-of-a-large-matrix/65512 "2021-07-29T19:35:17Z")

</div>

Hi, I have a matrix A = rand(M,N). I need to compute the maximum by column. Then compute the number of maximands in each row. What is an efficient way for large matrices? Here is what I am doing. B = (A.==maximum(A,dim…

---

## [\[ANN\] LightLattices.jl - lazy interface to lattices with arbitrary unit cells](https://discourse.julialang.org/t/ann-lightlattices-jl-lazy-interface-to-lattices-with-arbitrary-unit-cells/65493)

<div class="topic-metadata">

**Author:** [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Replies:** 1\
**Last updated:** [July 29, 2021, 6:16pm UTC](https://discourse.julialang.org/t/ann-lightlattices-jl-lazy-interface-to-lattices-with-arbitrary-unit-cells/65493 "2021-07-29T18:16:52Z")

</div>

Hi, everyone. This is an announcement for the package LightLattices.jl. It provides the lazy interface to work with lattices. The lattices of arbitrary dimensionality and arbitrary unit cells are supported. Overview Th…

---

## [@formula for Lathe.preprocess UndefVarError](https://discourse.julialang.org/t/formula-for-lathe-preprocess-undefvarerror/65504)

<div class="topic-metadata">

**Author:** [@YummyPampers2](https://discourse.julialang.org/u/YummyPampers2)\
**Replies:** 12\
**Last updated:** [July 29, 2021, 6:11pm UTC](https://discourse.julialang.org/t/formula-for-lathe-preprocess-undefvarerror/65504 "2021-07-29T18:11:48Z")

</div>

Hello Everyone: I am attempting to perform a logistic regression and for some reason the @formula macro, is not reading. using GLM using Lathe: preprocess fm = @formula(Outcome ~ Sesh1 + Shes2 + Sesh3) logit = glm…

---

## [Adding information from one DataFrame to another](https://discourse.julialang.org/t/adding-information-from-one-dataframe-to-another/65230)

<div class="topic-metadata">

**Author:** [@Nash](https://discourse.julialang.org/u/Nash)\
**Replies:** 11\
**Last updated:** [July 29, 2021, 2:22pm UTC](https://discourse.julialang.org/t/adding-information-from-one-dataframe-to-another/65230 "2021-07-29T14:22:26Z")

</div>

I have a DataFrame that contains the columns “Date” and “Ticker”. Suppose I have another DataFrame too that contains the columns “Date” and “ClosingPrice”. How do I add the information from the second DataFrame to the …

---

## [Print boolean with PrettyTables.jl](https://discourse.julialang.org/t/print-boolean-with-prettytables-jl/65491)

<div class="topic-metadata">

**Author:** [@Christopher\_Fisher](https://discourse.julialang.org/u/Christopher_Fisher)\
**Replies:** 3\
**Last updated:** [July 29, 2021, 12:46pm UTC](https://discourse.julialang.org/t/print-boolean-with-prettytables-jl/65491 "2021-07-29T12:46:07Z")

</div>

I am printing a struct with PrettyTables.jl and would like boolean values to print out as true or false rather than Float64s. Is there a way to do this? Thank you. Example using PrettyTables struct M x::String …

---

## [Converting a double number into a string (not printing!)](https://discourse.julialang.org/t/converting-a-double-number-into-a-string-not-printing/65492)

<div class="topic-metadata">

**Author:** [@julio.ca2020](https://discourse.julialang.org/u/julio.ca2020)\
**Replies:** 4\
**Last updated:** [July 29, 2021, 12:37pm UTC](https://discourse.julialang.org/t/converting-a-double-number-into-a-string-not-printing/65492 "2021-07-29T12:37:11Z")

</div>

I am trying to get a string with a number (double) formatted with 2 decimals… If i use interpolation I get the following A = 3.14256789 c = “The letter is $A” c is then “The letter is 3.14256789”… What I am looking …

---

## [Recent errors with WGLMakie on Pluto](https://discourse.julialang.org/t/recent-errors-with-wglmakie-on-pluto/64859)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 18\
**Last updated:** [July 29, 2021, 11:54am UTC](https://discourse.julialang.org/t/recent-errors-with-wglmakie-on-pluto/64859 "2021-07-29T11:54:47Z")

</div>

I don’t know what happened but I started getting this warning on a previously working Pluto notebook with WGLMakie plots: ┌ Warning: Waiting for page sessions to load. │ This can happen for the first cel…

---

## [Getting started: MIP variables and datastructure](https://discourse.julialang.org/t/getting-started-mip-variables-and-datastructure/63766)

<div class="topic-metadata">

**Author:** [@Annette\_F](https://discourse.julialang.org/u/Annette_F)\
**Replies:** 11\
**Last updated:** [July 29, 2021, 11:42am UTC](https://discourse.julialang.org/t/getting-started-mip-variables-and-datastructure/63766 "2021-07-29T11:42:33Z")

</div>

Hi all, In short; I’m trying to find if and how I can formulate a MIP on a datastructure. I have a set of orders ( with handling time, start location, end location and each location a timewindow ) And I want to combin…

---

## [How do I properly interpolate \`$\` in Markdown?](https://discourse.julialang.org/t/how-do-i-properly-interpolate-in-markdown/65482)

<div class="topic-metadata">

**Author:** [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Replies:** 8\
**Last updated:** [July 29, 2021, 11:20am UTC](https://discourse.julialang.org/t/how-do-i-properly-interpolate-in-markdown/65482 "2021-07-29T11:20:54Z")

</div>

I’m a bit confused by this: julia\> using Markdown julia\> x = 5; y = 7; z = 10; julia\> md""" Here I interpolate x: $(x). Then I also interpolate y: $(y) but for z I want a \\$ sign before the value: \\$$(z)m. …

---

## [Correct use of Timer](https://discourse.julialang.org/t/correct-use-of-timer/65490)

<div class="topic-metadata">

**Author:** [@DrChainsaw](https://discourse.julialang.org/u/DrChainsaw)\
**Replies:** 0\
**Last updated:** [July 29, 2021, 11:09am UTC](https://discourse.julialang.org/t/correct-use-of-timer/65490 "2021-07-29T11:09:29Z")

</div>

I’m making use of Timer with a callback function to create a simple (?) purpose built cache-mechanism where large objects are moved to disk a short while after they have been used and I’m starting to feel that famous sen…

---

## [\`num\_constraints\` to return the total number of constraints](https://discourse.julialang.org/t/num-constraints-to-return-the-total-number-of-constraints/65488)

<div class="topic-metadata">

**Author:** [@raphaelsaavedra](https://discourse.julialang.org/u/raphaelsaavedra)\
**Replies:** 2\
**Last updated:** [July 29, 2021, 11:08am UTC](https://discourse.julialang.org/t/num-constraints-to-return-the-total-number-of-constraints/65488 "2021-07-29T11:08:37Z")

</div>

Apparently num\_constraints only accepts concrete types, which means it’s not straightforward to return the total number of constraints in the model. Is there a straightforward way of doing this, or do we need to resort t…

---

## [IRTools: How to wrap a function into Try / Catch block](https://discourse.julialang.org/t/irtools-how-to-wrap-a-function-into-try-catch-block/65489)

<div class="topic-metadata">

**Author:** [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Replies:** 0\
**Last updated:** [July 29, 2021, 10:51am UTC](https://discourse.julialang.org/t/irtools-how-to-wrap-a-function-into-try-catch-block/65489 "2021-07-29T10:51:47Z")

</div>

Hi all, I am using IRTools and would like to change my IR in such a way that the whole body is wrapped in a simple try ... catch e return nothing end I couldn’t find help in the documentation Home · IRTools and he…

---

## [Creating a custom package at a custom folder](https://discourse.julialang.org/t/creating-a-custom-package-at-a-custom-folder/65480)

<div class="topic-metadata">

**Author:** [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)\
**Replies:** 0\
**Last updated:** [July 29, 2021, 7:34am UTC](https://discourse.julialang.org/t/creating-a-custom-package-at-a-custom-folder/65480 "2021-07-29T07:34:40Z")

</div>

I am trying to create my own custom package using PkgTemplates (Home · PkgTemplates.jl). I want the package files to be in my Dropbox folder to sync between my desktop and laptop. I tried to use the dir option in the te…

---

## [Tullio boundary error for shifted stencil](https://discourse.julialang.org/t/tullio-boundary-error-for-shifted-stencil/65442)

<div class="topic-metadata">

**Author:** [@Chiil](https://discourse.julialang.org/u/Chiil)\
**Replies:** 11\
**Last updated:** [July 29, 2021, 7:05am UTC](https://discourse.julialang.org/t/tullio-boundary-error-for-shifted-stencil/65442 "2021-07-29T07:05:35Z")

</div>

I implemented three versions of a 1D diffusion kernel, two with Tullio. The third version makes errors near the boundary. Is this illegal syntax and if so, can I fix this? I would like to avoid the second method in my ac…

---

## [\[ANN\] ERFA.jl 1.0 (and 1.1) – Essential Routines for Fundamental Astronomy](https://discourse.julialang.org/t/ann-erfa-jl-1-0-and-1-1-essential-routines-for-fundamental-astronomy/65424)

<div class="topic-metadata">

**Author:** [@helgee](https://discourse.julialang.org/u/helgee)\
**Replies:** 0\
**Last updated:** [July 28, 2021, 9:18am UTC](https://discourse.julialang.org/t/ann-erfa-jl-1-0-and-1-1-essential-routines-for-fundamental-astronomy/65424 "2021-07-28T09:18:21Z")

</div>

The venerable ERFA.jl has reached version 1.0 :tada: For those who have not heard about it, yet, it is a Julia wrapper for liberfa which in turn is the open-source version of the Standards of Fundamental Astronomy (SOFA…

---

## [UniformScaling type](https://discourse.julialang.org/t/uniformscaling-type/65472)

<div class="topic-metadata">

**Author:** [@jinml](https://discourse.julialang.org/u/jinml)\
**Replies:** 1\
**Last updated:** [July 29, 2021, 4:30am UTC](https://discourse.julialang.org/t/uniformscaling-type/65472 "2021-07-29T04:30:28Z")

</div>

What’s the point of having this type? It seems to behave just like a scalar number. When is it ever necessary?

---

## [Spark.jl install error](https://discourse.julialang.org/t/spark-jl-install-error/31000)

<div class="topic-metadata">

**Author:** [@jdhooghe](https://discourse.julialang.org/u/jdhooghe)\
**Replies:** 2\
**Last updated:** [July 29, 2021, 12:55am UTC](https://discourse.julialang.org/t/spark-jl-install-error/31000 "2021-07-29T00:55:20Z")

</div>

Good evening. I am attempting to install Spark.jl and an error is popping up. I am unsure what to look for given the following error message. Any help would be appreciated. Thank you. (v1.0) pkg\> build Spark Building …

---

## [Seeking people interested in sharing their love for Julia](https://discourse.julialang.org/t/seeking-people-interested-in-sharing-their-love-for-julia/65465)

<div class="topic-metadata">

**Author:** [@lauragfunderburk](https://discourse.julialang.org/u/lauragfunderburk)\
**Replies:** 0\
**Last updated:** [July 28, 2021, 9:42pm UTC](https://discourse.julialang.org/t/seeking-people-interested-in-sharing-their-love-for-julia/65465 "2021-07-28T21:42:36Z")

</div>

Hi everyone! I am seeking a couple folks in the Julia community who are eager to share their knowledge on beginner and intermediate Julia. These workshops would be delivered as part of the Vancouver DataJam, a 100% remo…

---

## [Plots figure size](https://discourse.julialang.org/t/plots-figure-size/37969)

<div class="topic-metadata">

**Author:** [@jonniedie](https://discourse.julialang.org/u/jonniedie)\
**Replies:** 9\
**Last updated:** [July 28, 2021, 9:14pm UTC](https://discourse.julialang.org/t/plots-figure-size/37969 "2021-07-28T21:14:44Z")

</div>

I just switched from Juno/Atom to VSCode and my experience has been mostly great. The one issue I have is the plot figure is tiny no matter what size the Julia Plots window is. In Juno, plots automatically scale to the s…

---

## [CuArray supports bits type error when performing automatic differentiation in sciml\_train (possibly due to array reshaping)](https://discourse.julialang.org/t/cuarray-supports-bits-type-error-when-performing-automatic-differentiation-in-sciml-train-possibly-due-to-array-reshaping/65389)

<div class="topic-metadata">

**Author:** [@timothypraditia](https://discourse.julialang.org/u/timothypraditia)\
**Replies:** 6\
**Last updated:** [July 28, 2021, 8:39pm UTC](https://discourse.julialang.org/t/cuarray-supports-bits-type-error-when-performing-automatic-differentiation-in-sciml-train-possibly-due-to-array-reshaping/65389 "2021-07-28T20:39:36Z")

</div>

Hello everyone, I’m trying to convert my code so that it would run on GPU, but I still encountered some issues. My code is mainly using DiffEqFlux, with some array reshaping required inside the Neural ODE function itse…

---

## [Fast performance of array comprehension without allocations](https://discourse.julialang.org/t/fast-performance-of-array-comprehension-without-allocations/65352)

<div class="topic-metadata">

**Author:** [@Chiil](https://discourse.julialang.org/u/Chiil)\
**Replies:** 14\
**Last updated:** [July 28, 2021, 8:07pm UTC](https://discourse.julialang.org/t/fast-performance-of-array-comprehension-without-allocations/65352 "2021-07-28T20:07:09Z")

</div>

I have the following code, where the nice and compact array comprehension code is 34x slower (880 ms vs 26 ms) than the written kernel and allocates memory where I would like to prevent this. Is there a way to make the s…

---

## [Julia sets in Julia, using Interact.jl - I'd like to get it faster](https://discourse.julialang.org/t/julia-sets-in-julia-using-interact-jl-id-like-to-get-it-faster/35533)

<div class="topic-metadata">

**Author:** [@zenon](https://discourse.julialang.org/u/zenon)\
**Replies:** 29\
**Last updated:** [July 28, 2021, 8:00pm UTC](https://discourse.julialang.org/t/julia-sets-in-julia-using-interact-jl-id-like-to-get-it-faster/35533 "2021-07-28T20:00:47Z")

</div>

Hi, after I talked about Julia to collegues some weeks ago, I somehow wanted to plot Julia sets (Wikipedia), simply because I thougt it to be a funny example. To play with it I used Interact.jl. The current result is t…

---

## [Macros to create anonymous function](https://discourse.julialang.org/t/macros-to-create-anonymous-function/65426)

<div class="topic-metadata">

**Author:** [@Wikunia](https://discourse.julialang.org/u/Wikunia)\
**Replies:** 2\
**Last updated:** [July 28, 2021, 7:30pm UTC](https://discourse.julialang.org/t/macros-to-create-anonymous-function/65426 "2021-07-28T19:30:23Z")

</div>

Is there a way to use a macro like default\_v = 1 af = @anonymous\_func begin @show v end v=default\_v to get transformed into (;v=1) -\> @show v I am wondering whether this is possible as the macro is created before…

---

## [Lathe.jl: No Method Matching Error](https://discourse.julialang.org/t/lathe-jl-no-method-matching-error/65455)

<div class="topic-metadata">

**Author:** [@YummyPampers2](https://discourse.julialang.org/u/YummyPampers2)\
**Replies:** 0\
**Last updated:** [July 28, 2021, 6:41pm UTC](https://discourse.julialang.org/t/lathe-jl-no-method-matching-error/65455 "2021-07-28T18:41:48Z")

</div>

Hello Everyone: I am using Lathe:preprocess Have attempted to activate the following functions from HERE: begin mutable struct OneHotEncoder{P} \<: Lathe.preprocess.Encoder predict::P function OneHotEncoder…

---

## [I have no idea what's wrong. Please help! ERROR: UndefVarError: i not defined](https://discourse.julialang.org/t/i-have-no-idea-whats-wrong-please-help-error-undefvarerror-i-not-defined/65416)

<div class="topic-metadata">

**Author:** [@programista](https://discourse.julialang.org/u/programista)\
**Replies:** 6\
**Last updated:** [July 28, 2021, 6:00pm UTC](https://discourse.julialang.org/t/i-have-no-idea-whats-wrong-please-help-error-undefvarerror-i-not-defined/65416 "2021-07-28T18:00:04Z")

</div>

I hvave no idea what wrong . Please help! julia\> for i=1:length(przedzaly)-1 var\_name=Symbol("lista\_polaczona\_" \* string(litery\[i\])) println(var\_name) @eval $var\_name=lista\[przedzaly\[i\]+1:przedzaly\[…

---

## [Sr. System Software Engineer - Julia](https://discourse.julialang.org/t/sr-system-software-engineer-julia/65454)

<div class="topic-metadata">

**Author:** [@Vish\_Canaran](https://discourse.julialang.org/u/Vish_Canaran)\
**Replies:** 0\
**Last updated:** [July 28, 2021, 5:16pm UTC](https://discourse.julialang.org/t/sr-system-software-engineer-julia/65454 "2021-07-28T17:16:22Z")

</div>

The quick summary You love to build scalable distributed software products in the cloud. You have experience with C++ and Julia. We pay $165K+ Canadian. We are remote first. You can help us extend our decision intellig…

---

## [Can I skip \`@boundscheck\` within a function](https://discourse.julialang.org/t/can-i-skip-boundscheck-within-a-function/65449)

<div class="topic-metadata">

**Author:** [@lieskjur](https://discourse.julialang.org/u/lieskjur)\
**Replies:** 4\
**Last updated:** [July 28, 2021, 5:08pm UTC](https://discourse.julialang.org/t/can-i-skip-boundscheck-within-a-function/65449 "2021-07-28T17:08:27Z")

</div>

Hi, suppose I am using a function function f(x,y) @boundscheck size(x) == size(y) || error("sizes do not match") x'y end written by someone else and I want to use arguments x = rand(2,2); y = rand(2). Is there a way …

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

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