Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? English version available on dev.to はじめに matplotlibで作ったグラフの細かい調整は大変です。何をどういじったらいいのかを調べるのにアホみたいに時間がかかることもあります1。「何を」の部分の名前さえわからないこともあります。解決の糸口を掴んだ後も希望通りの見た目を実現するまでの最後のアレンジに苦労することが多いです2。これらの問題は matplotlibのグラフがどういう要素で構成されていて、それらに対してどういうことができるかを知る ことでいくらか改善されます。私はひたすらStack Ov
bicycle1885.hatenablog.com こちらの記事を拝見していて、ちょっと気になったので注釈。 PythonやRを使っている人で、ある程度重い計算をする人達には半ば常識になっていることとして、いわゆる「for文を使ってはいけない。ベクトル化*1しろ。」という助言があります。 これは、PythonやRのようなインタープリター方式の処理系をもつ言語では、極めてfor文が遅いため、C言語やFortranで実装されたベクトル化計算を使うほうが速いという意味です。 昔からよくこういう言い方がよくされるが、本当にPythonのfor文は遅いのだろうか。 聞くところによるとRのfor文はガチで遅いそうだが、Pythonの計算が遅いのはインタープリタ方式だからでも、for文が遅いからでもない。もちろん、Pythonはインタープリタなので遅いし、for文だって極めて遅い。しかし、これはPyt
こんばんは。数学とコンピュータ II Advent Calendar 10100日目の記事を書かせていただきます。 この記事では、ソリトンと呼ばれる対象についてご紹介します。 やや数学・物理色が強め、ですが、あまり詳細に囚われず読んでいただければ幸いです。 ちなみにソリトンは歴史的に見ても計算機のおかげで発展したと言っても過言ではなく、一方で近年ではセルオートマトンといった対象とも関わりがありますので、テーマ的にはあっていると思います。 そして日本が元々強い分野でありながら、あまり周知されていない気がするので、もし興味ある方(特に計算機に強い方々)が増えて、この分野が活気づけばいいな、と思って今回投稿しました。 本論に入る前に 1.まずちょっと言い訳(お詫び)です。 もともとlatexで書いていて、後でマークダウン用に変換したのですが、慣れていないためレイアウト等がかなり適当です。また数式
At Instagram, we have the world’s largest deployment of the Django web framework, which is written entirely in Python. We began using Python early on because of its simplicity, but we’ve had to do many hacks over the years to keep it simple as we’ve scaled. Last year we tried dismissing the Python garbage collection (GC) mechanism (which reclaims memory by collecting and freeing unused data), and
Advanced Numpy Techniques¶ General, user-friendly documentation with lots of examples. Technical, "hard" reference. Basic Python knowledge assumed. CPython ~3.6, NumPy ~1.12 If you like content like this, you might be interested in my blog What is it?¶NumPy is an open-source package that's part of the SciPy ecosystem. Its main feature is an array object of arbitrary dimension, but this fundamental
こんにちは。グレブナー基底大好きbotです。 第1回では、環を定義し、その簡単な具体例として、整数環や多項式環を挙げました。 実は、これらは両方とも"可換環"と呼ばれる特殊な環になっています。 第2回では、可換環と非可換環について取り上げたいと思います。 復習 「環」とは、"足し算"と"掛け算"の演算ができて、次の8つの条件を満たす集合のことでした。 定義1 $R$ を集合とし,2つの演算 "$+$" と "$*$" が入っているとする.この時,$R$ が次の8つの条件を満たすならば,$R$ は環であると呼ばれる. 任意の $R$ の元 $a,b,c$ に対し,$(a+b)+c=a+(b+c)$. (和の結合律) $R$ の元 $0$ が存在して,任意の $R$ の元 $a$ に対し,$a+0=a$. (0の存在) 任意の $R$ の元 $a$ に対し,ある $R$ の元 $b$ が存在し
Edit 12/19/2017: added a new subsection on analyzing Chutes & Ladders as an Absorbing Markov Chain. This weekend I found myself in a particularly drawn-out game of Chutes and Ladders with my four-year-old. If you've not had the pleasure of playing it, Chutes and Ladders (also sometimes known as Snakes and Ladders) is a classic kids board game wherein players roll a six-sided die to advance forward
Almost all of these profilers live inside your process Before we start getting into the details of these profilers there’s one really important thing – all of these profilers except pyflame run inside your Python/Ruby process. If you’re inside a Python/Ruby program you generally have pretty easy access to its stack. For example here’s a simple Python program that prints the stack of every running
Wallaroo 0.6.o has been released! Check out the beautiful new API to go along with our Python 3 support. Learn more Your application probably has a performance problem. Or your app has a terrible bug. Or both. To find and fix these problems, many software developers use a profiler or a debugger. Profilers and debuggers are (usually) fantastic tools for solving performance and correctness problems.
What’s so dangerous about pickles? Those pickles are very dangerous pickles. I literally can’t begin to tell you how really dangerous they are. You have to trust me on that. It’s important, Ok? – “Explosive Disorder” by Pan Telare Before we get elbow deep in opcodes here, let’s cover a little background. The Python standard library has a module called pickle that is used for serializing and deseri
Hello! This is a detailed example of exposing Rust code to other languages (in this case, Python). Most articles I’ve seen that cover this topic uses really trivial example functions, skipping over a lot of the complexity. Even the better ones out there typically don’t have a pre-existing, reasonably complex program to work with. I’m going to start with trivial functions and build my way up to bei
はじめに どうも初めまして、グレブナー基底大好きbot (Twitter:@groebner_basis) です。 最近、プログラマ向けの数学のセミナーや勉強会*1が開催されるなど、コンピュータを専門にする人が純粋数学に興味を持つ機会が増えてきました。 そこで、この記事では、計算科学とも関わりの深い「可換環論」について、プログラミングの側面から解説していきたいと思います。 可換環論とは 可換環論は、代数学に含まれる分野で、140年以上の歴史があります。名前の通り、「可換環」と呼ばれる数学的対象を研究する分野です。この可換環については、後々詳しく説明したいと思います。 かつての数学者は、計算といえば紙に書く「手計算」が主な手法でした。しかし、近年では、コンピュータの発達に伴い、可換環論の色々な計算が数式処理システム(Computer Algebra System) で実現できるようになりまし
That basically means that 3 things in Python currently have the integer value 24601. Why would Python keep track of how many things have a value that’s a particular integer? Since integers are one of the immutable data types in Python, Python can save computing resources by having all the variables that contain 24601 refer to the same data in the computer’s memory. For example, if we keep running
Naturally, we want to maximize the right-hand-side of the above statement, which happens to be our likelihood function. I like to think of the likelihood function as “the likelihood that our model will correctly predict any given \(y\) value, given its corresponding feature vector \(\hat{x}\)”. It is, however, important to distinguish between probability and likelihood.. Now, we expand our likelih
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く