John Singh
John Singh

Reputation: 79

Big Endian is not supported in Little endian compiler Python. How to convert to Big Endian Compiler

I used seaborn module in python kde plot. I used fits file and astropy table for this. here is my code. When I run the code, it says Big Endian is not supported in Little Endian. I can run this in my previous Jupiter notebook but I reinstall anaconda jupyter again and It is not working now. How to make it work? Is there any way we can have BIG ENDIAN compiler. I changed to panda from astropy table but it is not giving the result properly. I want to use astropy table. Kindly do help. Thanks

import numpy as np
import matplotlib.pyplot as plt
from astropy.table import Table
import seaborn as sb 
plt.figure(figsize=(14,12))
X=data['ra']
Y=data['dec']
levels=np.arange(0, 0.3 ,0.02)

sb.kdeplot(X,Y,cmap='Reds',hue_order=False,levels=levels,shade=False, shade_lowest=True,gridsize=500, cbar=False,fill=True,annot = True)

plt.scatter(X,Y,s=1.2,color='red')



s=plt.scatter(X, Y,edgecolor='k',lw=3, label='NB926 [OII] emitters',facecolor='None')


plt.xlabel('RA[deg]')
plt.ylabel('DEC[deg]')
plt.gca().invert_xaxis()

Upvotes: 1

Views: 1601

Answers (1)

Tom Aldcroft
Tom Aldcroft

Reputation: 2542

Without see a few more details like the exception stack trace it is a bit difficult to be sure. However, this may be discussed in https://github.com/astropy/astropy/issues/11286 and fixed in https://github.com/astropy/astropy/pull/11288.

A workaround might be

data = Table(data.as_array().byteswap().newbyteorder('='))

Upvotes: 1

Related Questions