Skip to content
This repository was archived by the owner on Aug 24, 2023. It is now read-only.

Sourcery Starbot ⭐ refactored nbrosse/controlvariates#1

Open
SourceryAI wants to merge 1 commit intonbrosse:masterfrom
SourceryAI:master
Open

Sourcery Starbot ⭐ refactored nbrosse/controlvariates#1
SourceryAI wants to merge 1 commit intonbrosse:masterfrom
SourceryAI:master

Conversation

@SourceryAI
Copy link

Thanks for starring sourcery-ai/sourcery ✨ 🌟 ✨

Here's your pull request refactoring your most popular Python repo.

If you want Sourcery to refactor all your Python repos and incoming pull requests install our bot.

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch https://github.com/sourcery-ai-bot/controlvariates master
git merge --ff-only FETCH_HEAD
git reset HEAD^


#from scipy.optimize import minimize

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 17-38 refactored with the following changes:

area = (xv[0, 1] - xv[0, 0])*(yv[1, 0] - yv[0, 0])
var = 2*np.sum(var)*area
print('var: {}'.format(var))
print(f'var: {var}')
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 115-115 refactored with the following changes:

df3[compt] = tab_titles[k]
compt +=1

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 70-291 refactored with the following changes:


#from scipy.optimize import minimize

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 17-66 refactored with the following changes:

plt.show()
#fig.savefig("approx_pi_Lpois_2d_nabla_rcond5.jpeg", bbox_inches='tight')

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 139-153 refactored with the following changes:


#from scipy.optimize import minimize

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 17-38 refactored with the following changes:

Comment on lines -118 to +124

# coeffs_pois = np.linalg.lstsq(L_pois, - f_tilde_flatten, rcond=rcond)[0]
#
# dxpois = np.dot(dxpois_mesh, coeffs_pois[:nb_bases**2])
# dypois = np.dot(dypois_mesh, coeffs_pois[nb_bases**2:])
# Lpois = np.dot(Lx_pois, coeffs_pois[:nb_bases**2]) + np.dot(Ly_pois, coeffs_pois[nb_bases**2:])

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 118-162 refactored with the following changes:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant