Skip to content

Floating point division by zero when first run import (python 3.6) RAD 10.2 x64 #69

@RavWin

Description

@RavWin

RAD Studio 10.2
Testing script:

import numpy as np
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt

example data

mu = 100 # mean of distribution
sigma = 15 # standard deviation of distribution
x = mu + sigma * np.random.randn(10000)
num_bins = 50

the histogram of the data

n, bins, patches = plt.hist(x, num_bins, normed=1, facecolor='green', alpha=0.5)

add a 'best fit' line

y = mlab.normpdf(bins, mu, sigma)
plt.plot(bins, y, 'r--')
plt.xlabel('Smarts')
plt.ylabel('Probability')
plt.title(r'Histogram of IQ: $\mu=100$, $\sigma=15$')

Tweak spacing to prevent clipping of ylabel

plt.subplots_adjust(left=0.15)
plt.show()

Sample Project Demo01 when Execute it generates error floating point division by zero. Second time it runs ok.
Crash is on 5305 string in PythonEngine
Result := PyRun_String(PAnsiChar(CleanString(command)), mode, _globals, _locals);

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions