Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Python
  3. Question
Python

OverflowError: Python int too large to convert to C long” on windows but not mac

Asked by Anusha Acharya Apr 2, 2021 14 views 1 answer
Share

About this question

 I was executing the same code on both windows and mac, with python 3.5 64 bit version:

On my windows os, the code looks like:

>>> import numpy as np

>>> preds = np.zeros((1, 3), dtype=int)

>>> p = [6802256107, 5017549029, 3745804973]

>>> preds[0] = p

Traceback (most recent call last):

  File "", line 1, in

    preds[0] = p

OverflowError: Python int too large to convert to C long

But, the same code is working fine on my mac os. Kindly help!

Your answer

1 Answer

More Python discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Python Blogs

Guides, tips and career advice on Python from JanBask experts.