Ubuntu boots to black screen, cannot access Grub
The solution posted by OP.
If Ubuntu is installed in UEFI mode, the key to access Grub is esc, not shift like usual!
Related videos on Youtube
Zayn Shuman
Updated on September 18, 2022Comments
-
Zayn Shuman over 1 year
I am struggling to use np.array correctly for my coding project in Python.
In essence, I am trying to generate an array from other arrays using nested for loops. I require the output array to be written to 3 decimal places.
As an example, I have an array a which is as following:
>>> a array([[ 34, 25, 76, ..., 143, 5, 95], [ 11, 127, 174, ..., 70, 58, 87], [174, 182, 24, ..., 115, 70, 180], ..., [198, 114, 134, ..., 132, 105, 144], [ 75, 24, 18, ..., 117, 77, 186], [113, 34, 91, ..., 1, 69, 56]])
m is a 300 by 15 array.
Here is my code:
lb = np.array([0]*15) ub = np.array([1,1,0.5,200,1,1,0.5,200,10,1000,0.5,200,192,192,192]) b = np.array([0] * (300*15) ).reshape((300, 15)) intervals = np.array([0.005,0.005,0.0025,1,0.005,0.005,0.0025,1,0.05,5,0.0025,1,1,1,1]) for i in range(0,300): for j in range(0,15): b[i][j] = lb[j] + (a[i][j]*intervals[j])
As an output I get:
>>> b array([[ 0, 0, 0, ..., 60, 20, 10], [ 0, 0, 0, ..., 70, 58, 87], [ 0, 0, 0, ..., 115, 70, 180], ..., [ 0, 0, 0, ..., 132, 105, 144], [ 0, 0, 0, ..., 117, 77, 186], [ 0, 0, 0, ..., 1, 69, 56]])
Where b is a 300 by 15 matrix. However, the 'zeros' in the matrix have been rounded to zero, they should be small values between 0 and 1.
How do I stop Numpy from rounding my values to 0 and instead output b to 3 decimal places?
I have already tried using np.around() and round() but neither seem to work.
I have also tested and this is not a 'pretty printing' issue, I have multiplied the array by large numbers and still get a zero.
Any suggestions would be greatly appreciated.
-
Pilot6 over 8 yearsPossible duplicate of My computer boots to a black screen, what options do I have to fix it?
-
Edward Torvalds over 8 yearswhen you see Grub (of your isntalled Ubuntu or pendrive) press
E
button on your keyboard, then goto the end of second last line and type thisnomodeset nouveau.modeset=0
and pressCtrl + X
and boot, then tell me if you get black screen or not -
oldfred over 8 yearsDid you install in UEFI mode, then use escape key (perhaps several times) to get to grub menu, or did you install in BIOS/CSM boot mode, then hold shift key to get to grub menu. Is fast boot off in UEFI? What brand/model motherboard? Have you experimented with just booting with internal Intel video? But that also needs a boot parameter: phoronix.com/… Skylake needs this boot parameter: i915.preliminary_hw_support=1
-